
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

This part of the assignment involves illumination and shading. The assignment web-page is at www.cs.umd.edu/class/fall2003/cmsc427/assg4/.
Note: The motions (camera movements, player movements) and energy bar for this assignment should be implemented as in Assignment 3.
(a) Change the primitives for the players from glutWireCube and glutWireSphere to glutSolidCube and glutSolidSphere. Set up the lighting and material parameters as follows:
(b) Draw the cubes representing the player limbs and torso with six rectangles each (instead of glutSolidCube). Calculate the normal vector at each vertex by averaging the normal vectors of the adjacent cube faces. Now shade them in OpenGL using smooth Gouraud shading. The cubes will now have less faceted appearance. (5)
(c) We have provided three texture files – ground.bmp, bricks.bmp, and sky.bmp. Texture map these to the floor, the walls, and the roof polygons of the Assignment 3 room as follows:
(d) Draw the shadows of the two players on the y = 1 plane. Note that this places the shadow slightly above the ground plane (y = 0) so that the shadow does not get occluded by the ground. Assume the light source is along the direction (1, 1, 1) as in part (a) above. (8)