Exercise | Solution |
---|---|
Part 1-1Draw a sphere in perspective view.
|
|
Parts 1-2, 2Draw a sphere in perspective view.
|
Subdivision level: |
Part 3Use Gouraud shading (with true normals) to draw a diffuse sphere lit by a distant, white, directional light with direction (0, 0, β1).
|
Subdivision level: |
Part 4
|
Subdivision level:
K_ambient
K_diffuse
K_specular
Shininess
Light red
Light green
Light blue
|
Part 5Use Phong shading by moving your implementation of the Phong reflection model to the fragment shader and varying positions and normals across triangles instead of colors. [Angel 6.5.3, 6.10]Is Gouraud or Phong shading the best method for simulating highlight? Explain. ------------------------------- ANSWER In Gouraud shading, the resulting lighting color is calculated per vertex, and the color values of the surrounding fragments are then the result of interpolating those vertex lighting colors. This results in the lighting being not very realistic unless large amounts of vertices are used. Phong shading, although more computationally expensive, results in smoother highlight. By interpolating positions and normals we can obtain more precise values to plug in our shading formulas. |
Subdivision level:
K_ambient
K_diffuse
K_specular
Shininess
Light red
Light green
Light blue
|
Part 6Answer the following questions: [Angel 5.2, 6.2, 6.3, 6.5, 6.8]
|
ANSWERS
|