Project7Fall11Summaries
Coaster (Nicholas Burbaum, Andrew Shen)Project Description A roller coaster moves through a small urban environment. The sun shines on the scene, and the cart that moves along the roller coaster track shines a headlight onto the tracks as it moves. <p>Several rendering options are provided:
Legend:
Technical OverviewBeing rather pressed for time due to circumstances leading up to our partnership and collaboration in this project, we implemented a simple demonstration of several basic and intermediate shader techniques and camera movement using Bézier curves. ShadersOur project features three major lighting techniques. The first (and default) method uses the Gouraud lighting model provided by the base OpenGL library. We use a stationary spotlight to represent the sun (GL_LIGHT0), and another mobile spotlight (GL_LIGHT1) to act as the cart's headlamp. The quality of the rendered frames is acceptable, but some geometric artifacts are visible. The p key switches the scene to using GLSL spot shaders to light the scene. These shaders are based off the lighting algorithms covered in class and sample shader code from the OpenGL site. The effect of using GLSL shaders is relatively equivalent to the results obtained from Gouraud lighting, but is noticeably smoother; a side effect of using certain values of spot cutoffs and spot exponents causes the scene to be a bit darker when rendered with shaders than with the default OpenGL lighting model. The t key switches the scene to cartoon shading, incorporating a mild edge-line effect and discretized coloring. This effect is most visible when the light positions are such that the track's specular component is presented clearly to the camera; it also manifests some unusual coloring artifacts in the concrete texture used on the buildings and the ground. Bézier pathsThe default camera position (loaded when the project is started, or by using the b key) is fixed to a point in the sky, watching the roller coaster cart move across the track. This does not involve any special camera motion. The c key places the camera just behind and above the cart that moves across the roller coaster tracks. The tracks and the camera path are both loaded from an external file containing control points for Bézier curves. The curves specified by the control points are C1 continuous for a smooth riding experience, and the camera position and cart orientation are interpolated for every position that the cart occupies during its journey. Of particular interest is the method of making the cart pitch to match the slope of the tracks. This is achieved by rotating the cart around an axis normal to both tracks, calculated by taking the cross product of the current velocity of the cart d, and the outward normal to the tracks n, d×n. The angle by which the cart will be rotated so that its bottom will be tangent to the tracks is determined by the angle between d and the projection of d onto the x-z plane. Since for our scene the tracks are exclusively located at z=0, we can simplify this to the angle between d and 1, 0, 0. However, we can only determine the positive angle between the two vectors, but on downward slopes we must rotate by a negative angle. To resolve this, we check the sign of the z-component of d×n. If the z-value is negative, we negate the angle to pitch the cart forward. |
The Future of Rampart (James Farquhar, Patrick Guan, Matthew Jones)Click here for the project's web site Story In the distant future, humans have long since abandoned the confines of Earth's terrestrial bounds. However, warfare is omnipresent and humans must always fight to prove who has the bigger pillar. Since it is the future, everyone is super smart and puzzle addiction has become the norm among teenagers. Now that we're traversing the universe with quantum neutrino technology that travels faster than light, humans have long since settled on many planets. A new popular fad with teens is to play the rampart. Teenagers will pick a random planet in the solar system that is stable enough to build on and will fight each other in an epic battle known as a Rampart. The objective is simple--destroy each other's territory by blowing it up. The players have one round of establishing a fortress, one round of placing artillery, then one round of destroying the other fortress. The fortress acts as a laser shield around the resource center it encloses. The blocks players use to surround a resource center are shaped much like tetris blocks, as the tetris fandom has long since evolved from mobile phone games centuries before. Once the players enclose resource centers, they have a round to place artillery, synthesized from the local resource foundry. Once this is done, the players will attempt to obliterate the walls and/or artillery recently established by the adversary. After that, there is a rebuilding period where the adolescent emperors have to cleverly rebuild their fortress as to first seal back up their territory then surround another tower to gain more resources for artillery. After this phase, the teenagers safe up in their space ships will attempt to secure victory by shooting their cheap interplanetary lasers at the enemy territory. If no tower is enclosed by walls, the laser will obliterate the resource center, signifying victory. This process continues until only one player has resource centers still standing and shielded. In the end, only the most clever of teens will have a fortress left standing. It is up to you to be this calculating conqueror. Techniques
Game Engine We made a simple game engine to handle the game logic for this game. It includes a scene graph to handle player controls for arbitrary number of players. It also handles events such as updating the scene and calling the special effects |
<p> <p> <p> |
The Lonely Warren Bear, The Warren Bear is Alone for Christmas (Raymond Paseman, Vincent Huynh)(The Warren Bear Doesn't Want to be Alone for Christmas) Download a PDF version of this summary with more pictures. Theme: Around this time of year, every year, the students of UCSD depart from the campus to escape from the painful confinements of education. They return to their friends and families to reunite, converse, and feast in celebration of Christmas and New Years. Their minds wander away from reality as they engage in boisterous activities. Everyone is at liberty from their personal dilemmas and without a care in the world. However, back at the UCSD campus, one poor lonely soul has been left behind, all alone in the empty silence. From the day the Warren Bear was born, he has experienced loneliness in the limited confines of the engineering quad lawn of the Warren College Campus. Upon first sight and joy of the holiday season, the students have temporarily forgotten and abandoned the Warren Bear. All alone, Warren Bear cries himself a river anxiously awaiting for the day that the celebrations end and the students return to him. He cries for attentions in hope that he will find some companionship to get him through these cold, tough times. Technical Features:
Techniques: Our first endeavors began with creating the focus of our project, the graphical representation of water. We began at first by using a grid of many Bezier patches to portray the surface of a body of water. The Bezier patches would have changing control points to animate some moving small waves within the water. However, we ran into some complications dealing with the C1 continuity within a grid of Bezier patches. It was simple to deal with C1 continuity with a 1-dimensional/direction attachment of Bezier patches (as in a 2-patch piece flag), but it was slightly more troublesome with 2-dimensional/direction attachments of many patches to create a grid collection of Bezier patches representing our pool of water. This ultimately lead to issues calculating the proper normal vectors at the joining edges. Normal vectors are the determining factor to produce proper effects with the light interaction properties of water. Assuming the Bezier patches were fully functional, it would suffice for our body of water. At this point we decided to try out an alternative method to represent water, using height maps to generate our body of water. The waves and animations of the water are now produced by creating a height map using the product of a sin function and cos function using the u-coordinates and v-coordinates along with an increasing time value to vary the waves in different locations. Our next focus was to add the bear in as the centerpiece to our scene. The Warren Bear was provided to us through an .obj file containing the vertices to draw the bear onto the screen. It was a simple task. We produced two shaders to show the Bear in a different way. One was using a more natural method to color to bear in the given lighting. It was a shader to shade the Bear for a point-light with Per-Pixel Shading using the Phong Illumination Model. We then produced a Toon Shader to shade the Bear in a less serious and fun manner. It provides a funny cartoon way to display the scene. To give a reason for the sudden body of water being created, we came up with the idea to have the bear create the pool of water through the form of tears. For this reason, we introduce a particle system to simulate particles of water flowing into the body of water. To make it seem like particles of water, we use numerous random number functions to generate the directions in which the particles move. In addition, the life span and initial velocity of each particle varies as well to bring some randomness and spread out the particles. Certain thresholds are used to prevent the particles from flying all over the place or living forever. In addition, thresholds are used to make the flow of particles move in a certain direction and orientation. To complete our project, we worked on additional effects that portray the visual properties of water. We introduced a shader that contributes the Fresnel Effect to the surface of the pool of water. This effect is what causes water to seem both transparent and opaque. From a large view angle compared to the normal vector of the water surface, water tends to reflect a lot light making it bright and glare at the viewer. However from a small view angle, water tends to reflect little light, and the viewer sees through the water surface as if it is transparent. To simulate the transparency, we use alpha-blending with the water to make it blend colors with the objects behind or within it and make it "seem" transparent. There are some particular effects that we had not done in our project due to the intensity of the calculations. For the Bear's tears, we didn't handle proper alpha blending. If proper alpha blending was taken care of, it would project a visual effect similar to what is seen on waterfalls. Large masses of water particles with randomness of movement would contribute to a range of colors from darker blues to lighter blues to whites to demonstrate transparencies based on density of the water particles. However, based on the number of particles we used, we would have to keep track or calculate a particle's position compared to another water particle's position for proper alpha blending. This relative calculation would be on par to calculating collision detection between all the particles. In addition, another intensive calculation would be calculating where the particles hit the body of water to produce a visual effect of ripples and turbulences in the water. This is literally doing collision detection for thousands of particles as they hit the water. In addition, the body of water is constantly moving, so it'd have to be calculated constantly. The region of contact of the particles with the body of water would gradually get closer to the Bear as the body of water rises up. Instead, we handle this by determining general locations to produce the ripples and turbulences based on the water level. Toggle Keys
|