Thursday, April 23, 2015

Class 12: How 3D Computer Graphics Work

For this assignment, we have to explain how 3D graphics work, taking a list of terms associated with 3D graphics, one by one, and defining them as they pertain.  I am going to take these terms in groups of three or four and explain their independent definitions as well as their relations to the other terms.  First, we have 3D Geometry.  3D geometry is something we have learned from the very first time our parents had us place different-shaped puzzle pieces into their corresponding slots in our cribs.  It is one thing to see a circle two-dimensionally, but when we see it as a 3D sphere, THAT is an advance in 3D geometry (See figure 1).  


Figure 1:


The second term(s) we have is "vertex points."  For this definition, I go back to high school geometry when we learned about 90 and 45 degree angles, just to rattle off two different examples.  For this example (Figure 2), I have chosen a 45 degree angle, illustrating that the vertex is the exact point where the X and Y vertices intersect.  Which also brings me to the third term to define: vertices.  Vertices is just the plural of vertex.  So in terms of 3D graphics, a 3D pyramid would have several vertices, as seen in Figure 3.  Fourth, we have the term "vector."  When it comes to 3D graphics, a vector is essentially the 2D figure that, when combined with other 2D graphics, creates a 3D graphic.  For example, each 2D triangle that is a side of a pyramid IS a vector (Figure 4).

Figure 2:


Figure 3:


Figure 4: 


Next, we have the term "polygon."  A polygon is ANY shape or figure that is connected, or made whole, by nothing other than straight lines (See Figure 5).  Which leads to the next term, "polygonal mesh."  Polygonal mesh is a collection of different vertices, vectors, and figures (2D) that, when put together, give the illusion of a 3D object (See Figure 6).  The example in Figure 6 is made out of all triangle vectors.


Figure 5:


Figure 6:
Next, we have the term "normal" as it is related to 3D computer graphics.  Just as we used to learn about tangent lines in geometry, a "normal" is essentially the same thing, but three dimensional (Figure 7).  A normal, if connected to the Y axis, is a perfect 90 degree angle from the tangent at any point on said plane.  

Figure 7:



Finally, we have lighting, shading, and texture mapping.  All three of these terms play in to each other.  For example, The lighting in Figure 4 (pyramid) is coming from the right hand side of the image, and the shading is exemplified by the darker left hand side.  TOGETHER, these two aspects of 3D graphics come together and help with texture mapping.  Below (Figure 8) is an example of a 3D model without texture mapping (1) versus a 3D model with texture mapping(2).


Figure 8:

Thursday, April 16, 2015

WebGL Chrome Experiments the FAIL IN FIREFOX

Here are my 3 picks for experiments that failed when I tried them:

First, I tried Marching Cubes Music Player .  There isn't much to say about this experiment other than when I tried to choose a different song to play from the menu in the top right of my screen shots.... NOTHING.  The experiment just didn't play music anymore.  So if you like the first song option in this experiment, you're in luck, but otherwise, not so much.


The 2nd experiment I chose was SKAZKA . At first, I had no idea what this experiment was all about, but after fiddling around for a bit, I realized that the 2 figures on either side of the egg structure in the screenshots were supposed to mimic each other.  As you can see, something is off because in the 2nd screenshot, one figure is down on all fours and the other has its hand way up in the air.


The 3rd experiment I chose was Saving Nemo . In this game, little fish start floating up toward the top of the screen.  The object is to shoot the bubbles surrounding the fish so that they fall back down into the water where they belong.  This was fine at first, but all of a sudden, I would be aiming toward a bubble and my boat would shoot in the complete opposite direction.  Something was off here.


WebGL Chrome Experiments using Google's Chrome Browser

Here are some screenshots from the three 3D "experiments" that I chose to highlight.  Enjoy:


The first two screenshots are from an experiment called "Wireframe Tendrils Shader."  This caught my attention because I have been having trouble falling asleep lately, and have resorted to listening to hypnosis videos on Youtube that, a lot of the time, are accompanied by graphics such as these.  It is quite relaxing watching this form "melt" and expand three-dimensionally.
Wireframe Tendrils Shader

 The 2nd experiment i chose to highlight looks simple, but is actually EXACTLY what we are looking for in this assignment.  The surrounding walls/grids hold the 4 balls in a confined space, but as you can see in the options menu, the way the balls move can be adjusted and played with to result in different patterns of motion.  Also, you can click and drag on the screen to view the cube at any angle you prefer.
Amiga Boing Balls


 Finally, I found a game.  You control the cube seen at the bottom of the screen, and attempt to avoid the other cubes as you race down the multicolor corridor by moving the mouse left or right.  Warning: this game is highly addictive.
Cube Runner


Thursday, April 9, 2015

Final #3: Group 3D Building Project


This is a few screenshots showing the process of a group 3D building project. It is a final exercise from the Immersive Education course that I am taking at Boston College. The course is called Discovering Computer Graphics. For details, visit the immersive BC portal at http://ImmersiveEducation.org/@/bc

As my portion of this project, I went to the water.  I am a big water guy, so that was the first place I looked. I decided to knock out (shovel if you will) 2 blocks of turf, letting the incoming water create a small tide pool.  Then I built an oak patio/dock with fence posts and torches surrounding it.  A beautiful sight at night.  I created a rustic look right off the dock by placing a wall of anvils.  Then behind the anvils, I created an open-air bar where the community can visit rain or shine.  The overhanging birch/ivy/glass roof protects from all the elements.  Here are the screenshots with brief descriptions of where in the process they came from:

 My first thought was to "dig out" these 2 pieces of turf to create a stream and tide pool in the pit being blocked by the turf.
 Right after I removed the turf.  The water is flowing into the adjacent pit behind me in this shot.
 Here is the pit filling up with water.
Another shot of the water rushing in to fill the pit.  Going to make for a great tide pool!

 This is a shot of the oak panelling going in to create our dock.
 More panelling


 Here is the beginning of the fence making sure nobody falls in unexpectedly.

 More fence.
 Finished fence before torches
 Fence after torches.
 Stairs up to the ground level


 Overall view.  Pretty sharp.
 Here are the anvils to create more of a nautical theme

 Here is the base of the bar structure


 Inside of the bar with a center podium, glass windows on third story, leading up to a birch finish
 Rest of the birch from inside
 Here is the beginning of the ivy roof.  The idea was to make this an open air structure
 The center of the roof is clear, protected by glass
 View looking up from inside
 Aerial View
 Another aerial view
 Beacons added to the top incase aircraft veer toward us.
 The design team of this wonderful world!
More aerial views
 Another shot of everyone meeting upstairs for a group shot
 Finished product of the bar/deck area
Another finished product shot.