You are on page 1of 17

Shading Models for Polygonal

CMSC 161: Interactive Computer
Flat Shading
Shade each polygon face using a
single intensity value

The light source is at infinity, so N L is
constant across the polygon face
The viewer is at infinity, so V is
constant across the polygon
The polygon represents the actual
surface being modelled and not an
approximation to a curved surface
Flat Shading
Very simple to implement, however, it may introduce
intensity discontinuities by Mach band effect
The human visual system is very sensitive to small
differences in light intensity (due to lateral inhibition)
Flat Shading
Not realistic exhibits polygonal structure
Simultaneous contrast
Interpolated Shading
Used when a polygonal object approximates a curved
Gouraud shading
Phong shading
Gouraud Shading
Is called intensity interpolation shading
Renders the polygon surface by linearly interpolating
intensity values across the surface
Compute the normal vector at each vertex by averaging the
normals of all polygons adjacent to the vertex
Compute the intensity at each vertex
Shade each polygon by interpolating
the intensities of the vertices
Gouraud Shading
Since neighboring polygons sharing vertices and edges
are approximations to smoothly curved surfaces and
wont have greatly differing surface normals, this
approximation is a reasonable one
Phong Shading
Is called normal vector interpolation shading
The normal vector is computed at each edge and is
Especially important with specular reflection
Computationally more expensive but gives better result
Gouraud vs. Phong Shading

Problems with Interpolated Shading
Polygonal Silhouette. No matter how good an
approximation an interpolated shading model offers to
the actual shading of a curved surface, the silhouette
edge of the mesh is clearly polygonal.
Perspective Distortion. Anomalies are introduced
because interpolation is performed after perspective
transformation in the 3D screen coordinate system,
rather than in the WCS.

Problems with Interpolated Shading
Orientation Dependence. The results of interpolated
shading models are not independent of the projected
polygons orientation.

Problems with Interpolated Shading
Problems at Shared Vertices.
Shading discontinuities can occur
when two adjacent polygons fail to
share a vertex that lies along their
common edge.
Unrepresentative Vertex Normals.
Computed vertex normals may not
adequately represent the surfaces
Still, polygons are sufficiently faster (and easier) to
process that they still form the core of most rendering
Comparison of Shading Models
Flat Shading
Gouraud Shading
Phong Shading
Flat Shading

Gouraud Shading

Phong Shading