Unit 5 Visible surface detection method

5th Semester

Gouraud Shading:

  1. Gouraud surface shading was developed in the 1970s by Henri Gouraud.
  2. It is the interpolation technique.
  3. Intensity levels are calculated at each vertex and interpolated across the surface.
  4. Intensity values for each polygon are matched with the values of adjacent polygons along the common edges.
  5. This eliminates the intensity discontinuities that can occur in flat shading.
  6. To render a polygon, Gouraud surface rendering proceeds as follows:
    • Determine the average unit normal vector at each vertex of the polygon.
    • Apply an illumination model at each polygon vertex to obtain the light intensity at that position.
    • Linearly interpolate the vertex intensities over the projected area of the polygon
  7. The average unit normal vector at V is given as:

Illumination values are linearly interpolated across each scan-line as shown in figure 41.

enter image description here

  • The intensities at point 4 can be interpolated from intensities 1 and 2.
  • Similarly, the intensities at point 5 can be interpolated from intensities 2 and 3.
  • Therefore the intensities of interaction points 4 and 5 are calculated from scan line.

Advantages:
i. It removes the intensity discontinuity which exists in constant shading model.
ii. It can be combined with hidden surface algorithm to fill in the visible polygons along each scan line.
Disadvantages:
i. Gouraud shading has a problem with specular reflections.
ii. Gouraud shading can introduce anomalies known as Mach bands.
Phong Shading:

  1. A more accurate interpolation based approach for rendering a polygon was developed by Phong Bui Tuong.
  2. Basically the Phong surface rendering model is also called as normal-vector interpolation rendering.
  3. It interpolates normal vectors instead of intensity values.
  4. To render a polygon, Phong surface rendering proceeds as follows:
  5. Determine the average unit normal vector at each vertex of the polygon.
  6. Linearly interpolate the vertex normal over the projected area of the polygon.
  7. Apply an illumination model at positions along scan lines to calculate pixel intensities using the interpolated normal vectors as shown in figure 42

enter image description here
Advantages:
i. It displays more realistic highlights on a surface.
ii. It greatly reduces the Mach band effect.
iii. It gives more accurate results.
Disadvantages:
It requires more calculations and greatly increases the cost of shading steeply.