You are on page 1of 17

Shading Models for Polygonal

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

Assumptions:
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
surface
Gouraud shading
Phong shading
Gouraud Shading
Is called intensity interpolation shading
Renders the polygon surface by linearly interpolating
intensity values across the surface
Steps:
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
interpolated
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
geometry.
Remark
Still, polygons are sufficiently faster (and easier) to
process that they still form the core of most rendering
systems
Comparison of Shading Models
Flat Shading
Gouraud Shading
Phong Shading
Flat Shading

Gouraud Shading

Phong Shading

You might also like