Review of important
directions and unit vectors: L, V, N, R.
Preview of all the coefficients that you will see shortly: C's and
K's
Types of Light
Sources in SLIDE:
Ambient, Directional, Point, and Spot Light.
Superposition Law:
Calculate the effects of each light individually and sum all the resulting
effects.
(I.e., there is no interactions between photons).
LAMBERT SURFACES -- what we see:.
Formula that shows view-angle independence.
LAMBERT PHYSICS -- why that is so:
Show where the cosine factors are coming from and why they cancel:
All the lighting energy that hits the surface gets absorbed temporarily,
then some percentage gets reemitted with some broad distribution
and which has a maximum re-emision probability perpendicular to surface.
Light absorption falls off with the cosine of the angle between
light and face normal.
This is because a surface at a non-perpendicular angle in a flux of
photons captures fewer
photons (by a cos- factor), since it exposes a smaller cross sectional
area to the photon stream.
This effect is viewer independent and can be pre-calculated once at
scene construction time.
The percentage of light re-emitted in a particular direction
depends on the properties of the surface, e.g., Kd, Cd
{R,G,B}
Light emission and (diffuse) reflection (= re-emission) are both
strongest in the normal direction;
they fall off with the cos of the angle away from the normal (the reason
is that grazing photons
have a hard time escaping the "rugged" surface, i.e., they get trapped
again by protrusions).
.
When viewing a surface from an arbitrary angle, this fall-off
is compensated by the fact that,
as we see the surface more foreshortened, we also crowd more emission
centers into
the apparent solid angle of our viewing field by 1/cos . ( DEMO
with black page with white dots.)
Thus a chalky Lambert surface has an apparent brightness
that does not vary with view direction.
This also explains why the apparent intensity of the sun is constant
across the whole perceived "disk".
(The sun is a " Lambert type emitter").
Key Point:
Flat polygons will appear of uniform brightness when uniformly lit,
and have the same brightness from all view points !
Thus the output spans for a flat polygon can be of uniform brightness
from left to right edge.
The result is, that we see a bright reflection spot where
the camera lies in the R direction;
everywhere else the surface is dark !
Phong Illumination/Lighting/Surface Model:
Show effect of exponent of cosine function.
Phong Highlight on glossy surface:
Even uniform directional light falling on a flat surface can produce
non-uniform brightntess,
if surface is partially reflective and we use a Phong illumination
model.
Now that we know what the brightness is that we would like to represent,
the question arises, how can we efficiently generate all the pixels
of the right brightness ?
Lambert lighting model + flat faces + uniform illumination -> easy:
==> ONE brightness value per polygon.
==> just take a representative value at centroid of face, and apply
brightness values to all pixels of the polygon.
All other cases are harder: they result in non-uniform apparent brightness!
Smooth shading can be applied whenever apparent brightness changes
across a surface,
-- either because the illumination is non-uniform,
-- the reflection has highlights,
-- or the surface is curved.
Faking smooth rounded objects:
Take an averaged brightness value at each corner,
derived from all incident lights and averaged vertex normals
(= vector sum of the face normals of all the adjacent polygons weighted
by angle subtended at vertex).
The result is fake: edges remain straight (visible at the silhouette
edges!) -- but it is efficient.
Limitations
of Gouraud Shading:
Some flat spots; extrema may be "short-circuited";
discontinuities at concave corners; missing highlights...
1. Compute normals at visual vertices, A, B, C, D ...
2. Compute normals along edges by vector interpolation.
3. Compute normals along spans by vector interpolation.
4.For every pixel compute brightness from interpolated normal direction
and local light intensities.
Phong can interpolate over flat spots. -- But it is not perfect either !
Limitations
of Phong Shading:
“Corrugated” structures with too few vertices (just a zig-zag)
may have all parallel normal directions and cannot represent periodic
shading variations.
Geometry that is not seen at vertices cannot be inferred !
Illumination changes that are not seen at vertices cannot be inferred
!