Interactive Computer Graphics: Assignment 6

Lighting, Materials, Gouraud and Phong Shading


Topics:



Extend your HW5 web page.

  1. Add a menu that allows the user to choose one of three different geometric models to view.

    1. One of the models should be bound-lo-sphere.smf.
  2. Average the normals for each face to create a unique normal for each vertex.

    1. Be sure to assign the averaged normal to all of the vertices that it is associated with.
  3. Implement the Phong shading model.

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

  5. Implement both Gouraud and Phong shading algorithms in your shader programs.

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

  7. 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.

  8. 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 choose 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.

  9. 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.

  10. 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.
    This light should have the following properties:

  11. Print out instructions on your page that describe how to use your interface.

smf files can be found here.

Your program should look something like this video.


Grading Scheme

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

Last modified March 23, 2023.