Interactive Computer Graphics: Assignment 6

Lighting, Materials, Gouraud and Phong Shading


Extend your HW5 program.

  1. Average the normals for each face to create a unique normal for each vertex.

  2. Implement the Phong shading model.

  3. Illuminate your geometric model with at least two point lights.

  4. Implement both Gouraud and Phong shading algorithms.

  5. Allow the user to interactively select either Gouraud and Phong shading.

  6. Allow the user to choose the material properties of your model from a pre-defined list of at least three materials.
    The three materials should be significantly different, i.e. don't just change the color. You should also change the shading properties.

  7. One of your materials should produce a bright white specular highlight similar to the example below.
    (Gouraud shading on the left and Phong shading on the right).

    One of your materials should have the following properties:

    When I load bound-lo-sphere.smf I should see an output similar to the one above. (One sphere of course.)
    When I switch between Gouraud and Phong shading, the output should switch between the two above spheres.

  8. Similar to your camera, place one of your lights on a cylinder around the object and allow the user to change the light location by modifying the angle, radius and height of the light's location.
    The light should only move when the user changes its location. This light should be defined in the coordinate system of the object.

  9. The other light should be defined in the camera coordinate system, i.e. it moves with the camera, and it should be located near the eye point.

smf files can be found here.

Movie of HW6 in action (sort of)

Grading Scheme

  1. Implementing multiple materials (1 point)
  2. Implementing Phong shading model (1 point)
  3. Implementing Phong shading algorithm (3 points)
  4. Implementing Gouraud shading algorithm (3 points)
  5. Allow the user to move one of the lights (1 point)
  6. Interface for selecting projections and materials, and rotating light (1 point)

Last modified February 26, 2017.