We commonly approximate "curved" objects with a
series of "flat" polygons (e.g., triangles)
An Implication:
When we light objects they appear to be faceted
A Problematic Aspect of Human Vision:
This is made worse because, at dark-light borders, exciting and
inhibiting photoreceptors do not cancel each other out
Motivation (cont.)
One Resolution:
Use curved objects
Another Resolution:
Modify the way flat surfaces are filled (which is
usually called shading)
Gouraud Shading
Approach:
Specify normals (that, hopefully,
correspond to the normals of the
curved object) at vertices
Determine the intensity at each vertex
Use a linear interpolation of the vertex intensities
at each pixel
Visualization:
Notation:
The normal at a point, \(\bs{q}\),
is denoted by \(\bs{n_{q}}\)
The lighting intensity at a point, \(\bs{q}\),
is denoted by \(I_{q}\)
Gouraud Shading (cont.)
The Intial Calculations:
Calculate
\(I_{a}\), \(I_{b}\), and \(I_{c}\)
using
\(\bs{n_{a}}\), \(\bs{n_{b}}\),
and \(\bs{n_{c}}\)
Initial Interpolations:
\(I_{f} = (1 - \phi) I_{a} + \phi I_{b}\)
\(I_{t} = (1 - \tau) I_{b} + \tau I_{c}\)
For Each Point on the Scan Line:
\(I_{p} = (1 - \pi) I_{f} + \pi I_{t}\)
where \(\pi = \frac{||\bs{p} - \bs{f}||}
{||\bs{t} - \bs{f}||}\)
Note: \(\pi = 0\) when \(\bs{p} = \bs{f}\)
in which
case \(I_{p} = I_{f}\). Similarly,
\(\pi = 1\) when \(\bs{p} = \bs{t}\) in which
case \(I_{p} = I_{t}\).
Phong Shading
Approach:
Specify normals (that, hopefully, correspond to the
normals of the curved object) at vertices
Use a linear interpolation of the vertex normals
at each pixel