Alex Chen (cs184-dw)
Tobit James Co Narciso (cs184-bm)
Solution will be released following demo. Controls
Our project uses the WASD keys for movement about the scene, while mouse movement changes view direction. Zooming is done with the E and F keys: E to zoom in, F to zoom out. Translation and scaling are done with the arrow keys; the mode is toggled with T (for translation) and B (for scaling). R resets the scene to the starting position. Q sets colors to correspond to normal values; this was mostly used for debugging, and it creates interesting visuals. X turns off lights and textures. C stops the motion of the gears.
The walls of the rooms, the gears, and the chess pawns were loaded from .raw and .obj files, respectively. (The files for the gears and pawns were found at artist-3d.com). Other shapes (C-shaped objects, cylinders, crescents) were done in the code itself, using for-loops to assist with vertex input.
For the fragment shader, we displacing normals with a function involving cosines to create an interesting ripple effect. For the vertex shader, we displaced the vertices themselved with a function involving sinc (fixing the normals in the process), which creates uneven surfaces.
Our scene consists of three rooms.
The scene begins in a hallway. There are no objects inside the hallway; the walls are colored purple, with the fragment shader's ripple effect applied.
One of the rooms is designed with the theme of a clock. The furniture is arranged to appear as the face of a clock from above. Constantly moving gears and a swinging, blade-shaped pendulum hang from the ceiling. On the far wall, there are various portraits that also move constantly.
The other room is devoted to a large chessboard, which sits atop a circular elevated section in the center of the room. The only pieces are two pawns in the center of the board, in position for one to capture the other. This room has an open ceiling - it is lighted by a single, constantly moving directional light from above.
Specifications Self-explanatory requirements italicized.
-Object by hand: cylinders, C-shapes, and crescents (assisted by for loops)
-Object from .obj: chess pieces
-Object from .raw: walls and gears
-Scaling/placement by hand
-Textured from .tga: chessboard, pictures
-At least two textures: chessboard, pictures
-Shiny and dull: crescents (shiny), clock face components (dull)
-Directional light: above chessboard room
-Point light: inside clock room, inside hallway
-Instantiated more than once: gears, most clock face components
-Fill and wireframe: gears
-Correct normals: everything except fragment shader effect areas and edges of crescents
-Double buffering, hidden surface elimination, perspective projection
-Light/texture disabling: 'x' key
-Fragment shader: "ripple" (cosine) effect in hallway
-Vertex shader: "ripple" (sinc) effect on chessboard
-Mouse/keyboard controls: explained above
-Constant animation: gears, pendulum, pictures