Thursday, December 13, 2012

It's Beginning to Look a Lot Like Cisterns!


Happy holidays! I have made some good progress. I will start from where I left off on my last post, and work my way up to where I am now.

The reason the outlines of the cisterns looked so strange last time was because I didn't realize how the vertices were laid out. In the file, they look like this (expect they are 70,000 lines long instead of 3):

v 0.5 1.5 2.5
vt 0.5 1.5
f 1 3 4

The v corresponds to a vertex, vt to a texture vertex, and f maps the vertices to each other. So in this case, vertices 1, 3, and 4 would form a triangle. Pretty cool! Well, before this I just thought it was a file of points that were supposed to be connected, which is why it came out funny. So, once I understood this, I went to work. I had a lot of problems getting it to display. WebGL is very picky and if you have one thing wrong it just doesn't do anything. There is no complier telling you you forgot a semi colon! My images came out like this:




That's not right! Well, Zoe helped me realize I had been scanning each x, y, z each separately as a point instead of mapping them together as a vertex. Instead of one array I now had an x[], y[], and z[]. Then I pushed them into the vertex positions array. Then I created a buffer and passed the vertices. And ta-da! It worked:

Top View

Side View

Water Texture

Bottom View
So, I have my first outline of the cistern. Nothing fancy yet, but it's a start. I decided my next task was to add water. This was difficult since I had a small bug that took me forever to find. It was hard for me to figure out how to have two different textures since I could only get one to display at a time. Eventually, I figured out how to get it to display. There was a lot of moving things around, changing the code, and especially looking at tutorials. One thing I realized is that order is very important, and once I got everything in the right order it worked. At first I struggled and it would only display one or the other:
Water, Top View 
Water, Side View


Working! Water with the cistern (and two different rock textures):

Inside View








I am looking into some tutorials on shading/lighting next to make it look more realistic. That's all folks!

-Vanessa

Monday, November 12, 2012

Reading Vertices From a File and Some View Manipulation & Textures!

Okay, so my task for this week was to scan in vertices from a file and create a representation of that object. In the end, I need to be able to scan in a list of vertices of triangles and then create a model based on these. We're talking 70,000+ vertices here!

So, I used this tutorial: http://learningwebgl.com/blog/?p=1067

Which as you can see creates a little world that you can move around in if you follow the link and view the tutorial. I made my own file, vertices.txt, which contains the vertices of the pyramid (represented by 3 triangles, each represented by X, Y, and Z coordinates). I then took a Google image of water and instead of loading their "mudTexture" I changed it to "waterTexture."

Screen shots: 




In the pictures on the left you can see these are the same view on the X-Y but change the Z coordinate. The page up and page down keys allow the viewpoint to change on the Z axis.



This is similar to just looking up and down, but not turning your head left and right.



Here, I pressed the down arrow and moved backwards. The interaction of the "camera" is kind of like moving around in a video game!



Here is an up close view of the pyramid!








Attack of the Scruffdogs (my dog)!!


I've been messing around with the files with the vertices... here's what happens when I just draw the vertices:
Case Cutietta Vertices

Convento Dei Cappuccini Vertices

Mdina Cathdral Sacristine Vertices

I don't know what the actual cisterns look like so I'm not sure if this is representative of what they really are, but it is after all drawing the vertices in the file. Note: they all have the water gif as a texture, that is unrelated to the cisterns!

That's it for now, stay tuned for more posts!!

-Vanessa

Sunday, October 21, 2012

Omeka Plugins

These past couple of weeks, I have been working exclusively with Omeka plugins. I have downloaded, installed, activated, and read about dozens of plugins available for use from Omeka. So far, I have tested the major ones that we’re most likely to use on our test server. Some of these include Collection Tree (which allows us to create collections of items that branch off into other collections), Contribution (which allows visitors to contribute various items), Exhibit Builder (a virtual gallery with related images and descriptions grouped into pages), and Simple Pages (which lets us create simple web pages linked from the main site).

At the beginning, the testing had been going really well! I was learning all about Omeka (you learn so much more by playing around with the tools than just reading about them!) and the plugins all worked successfully without error. That is, until this past Thursday, when I started receiving error messages from Omeka whenever I tried to upload, view, or search for an item. As of now, I’m not sure why these errors are being produced. We’ll have to look at the error log and hopefully discover the source of the errors and be able to fix them.

Stay tuned...
Amanda

Saturday, October 20, 2012

Learning, learning, and learning more!

I've been hard at work trying to learn the basics of graphics! After having several meetings and talking to people who have previously worked with the data from Malta and Sicily, we have decided to go with WebGL instead of Unity. This is because in WebGL you have more control over what you can do, even though it is more complex to learn and understand. Well, I'm up for the challenge!

I have been working on these tutorials: http://learningwebgl.com/blog/?p=28

It took me a while to get acquainted with WebGL, and I couldn't figure out why my code wasn't displaying anything! I finally figured it out so now I'm working through the tutorials. There are a lot of confusing and new words but I'm doing my best to learn what they mean. The tutorials have a lot of new words so I have to read them 5-6 times before I understand them, but they are really specific and helping me understand.

I also just got this book in the mail yesterday: http://www.amazon.com/OpenGL-ES-2-0-Programming-Guide/dp/0321502795/

It is guided towards OpenGL development in phones, but Zoe recommended it because it explains the concepts very well. I will start reading it and doing the book tutorials this weekend.

In my online tutorials, we had to draw a triangle and a square. I decided to make a house! At first I was confused because I couldn't get it to draw more shapes, but then I figured out I needed to first create the shape inside the initialize shader method, and then I had to translate, bind the buffers, and draw the arrays (the points of the shapes are stored in a 3D array, see below).

Here is my house:

Pretty cool, right? It's awesome how I just set the z of the shape and it magically becomes 3D. Okay, it's not really magical but since I only worked with non-3D stuff before it's awesome!

Here's how the shapes are stored:


        squareVertexPositionBuffer = gl.createBuffer();
        gl.bindBuffer(gl.ARRAY_BUFFER, squareVertexPositionBuffer);
        vertices = [
            -1,  0.0,  0.0,
            -3,  0.0,  0.0,
            -1, -2.0,  0.0,
            -3, -2.0,  0.0
        ];
        gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(vertices), gl.STATIC_DRAW);
        squareVertexPositionBuffer.itemSize = 3;
        squareVertexPositionBuffer.numItems = 4;

As you can see you have to do a lot just to create the shape itself, and later in the drawing method you have to bind the buffers and draw arrays. It's pretty complex, and I have yet to figure it all out yet. But I'm learning a lot and hopefully in the next few weeks I will be able to work with real data!

On a side note, I applied to go on the Malta and Sicily trip for next quarter (last 4 weeks). I am really excited because it would help me so much with this project (I would be taking a graphics course too!).

I can't wait to become more comfortable with WebGL and start developing prototypes of the actual data :).

-Vanessa

Friday, October 5, 2012

Researching and testing Omeka's features

In the past couple of weeks, I have been exploring other sites using Omeka to see if they use Omeka’s features effectively and to discover the different plugins that are available. I found a few good examples that we can refer to when building our site, because they have added plugins and features to make their sites more interactive, which is something we would like to do. Here are a few of the sites that I liked and are similar to ours that I think we should use as examples:

http://vagovernmentmatters.org

I like this site because it has great organization and has similar pages that we’d like to have: activities, case studies, and teaching resources. Each item has a picture and short description to make browsing easier. They also incorporated a lot of plugins: Coins, Simple Pages, Custom Routes, Dropbox, Exhibit Builder, Tag Bandit, MyOmeka, OaiPmhRepository

http://www.civilwarinart.org

When you first enter this site, it is very visually impressive. I also really like the “classroom projects” tab, which features 3 different lesson plans available for middle school and high school teachers to use in their classrooms. The lesson plans are designed to take 5 class periods and are very well planned out. We should definitely look at these lesson plans when creating ours. However, they didn’t use any additional plugins besides the most basic ones that Omeka offers.

http://www.floridamemory.com

This site has the greatest variety that I’ve seen. There are photographs, documents, timelines, educational resources, video, and audio. I think this is a great example of a site that works as an “online classroom”--something we would like to incorporate into our site.

I’ve also been doing some more research on Omeka’s features and how we can best utilize them. We just got the server installed this past week and so far, I’ve installed the "Simple Pages", "Collection Tree", and “Contribution” plugins. I have been playing around the the features of the plugins and have tested the Contribution plugin as a site visitor. I was able to contribute both stories (by writing text or uploading a text file, or both) and images (by uploading an image). There are a few minor problems that I have with this plugin, but I’ll work more to see if I can adjust the settings to fix these. I will also continue installing and testing more plugins that we might be interested in using.


-Amanda

Tuesday, September 18, 2012

Introductions: Vanessa Forney


My name is Vanessa and I am a Junior at Cal Poly. I am a Computer Science major and I'm currently taking Computer Organization and Fundamentals of Computer Science III. Eventually, I plan to continue on to graduate school at Cal Poly to further my knowledge of Computer Science!

I am very excited to begin working on this research project with Zoe, Jane, and Amanda. I have started learning about WebGL, Unity, and looking through the information from the trips to Malta. I look forward to learning a lot this year and getting this project up and running :).

Introductions: Amanda Erb


My name is Amanda and I am a Junior at Cal Poly, San Luis Obispo. I am majoring in Graphic Communication with a concentration in Web & Digital Media and a minor in Media Arts & Technology.

As the person in charge of Data Structure and Format, I am thrilled at this opportunity to both use and enhance my current skills to compile and display our data on a user-friendly interactive website.

Sunday, September 16, 2012

Introductions: Zoë Wood

Malta interior 2011
I am very excited to be a part of this multi-disciplinary undergraduate research project.  I am an Associate Professor in computer science.  My research is focused on computer graphics.  I also serve as one of the technical advisors for the International Computer Engineering Experience (ICEX) Program

Tuesday, September 11, 2012

Introductions: Jane Lehr

Gozo, Malta, 2011
I am very excited to be part of this "learn by doing" undergraduate research collaboration between the Colleges of Engineering and Liberal Arts at Cal Poly.

I am an Associate Professor in the Departments of Ethnic Studies and Women's & Gender Studies at California Polytechnic State University. I am also Equity & Access Programs Director for the Center for Excellence in Science and Mathematics Education (CESaME) and the Global Engineering/Cultural Advisor for the International Computer Engineering Experience (ICEX) Program. Previously, I served as elected co-chair of the Science & Technology Taskforce/Feminists in Science & Technology Studies (FiSTS) of the National Women's Studies Association and as a Post-Doctoral Research Officer for the NSF-funded Center for Informal Learning and Schools (CILS) at King's College, University of London. My PhD is in Science & Technology Studies and Women's Studies at Virginia Tech.