More Light on Light
Tom Kelliher, CS 320
Apr. 13, 2011
Read Chapter 6 (with heart!).
Introduction to light.
- Review of
twoWindowsOne.c
and twoWindowsTwo.c
.
- Derivation of Phong lighting model.
- Computing normal vectors.
Lighting lab.
- Consider an object point,
and a light source
.
- Important vectors:
: vector to light source.
: surface normal.
: vector to COP.
: reflection vector.
- The light from source to object can be described by:
(theoretically wrong but, in practice, right)
- Using material properties, distance from source, orientation of
surface and direction of source a reflection matrix can be constructed:
- (Simplified) Illumination at
:
A global ambient term may be ``thrown'' in.
Same at each point on a surface:
Repeat for each color.
- Diffuse surface brightest at noon, dimmest at dawn, dusk.
- Lambert's law: we see only the vertical component of light:
- If
and
are normalized:
So:
- Specular reflection produces highlights.
- The smoother the surface (higher shininess) the narrower the range
of reflection angles.
- Reflectivity proportional to angle between viewer (
) and
perfect reflection (
):
where
is the shininess term:
for objects with broad highlights.
- 100 to 500 for most metallic objects.
- Assuming normalized vectors:
Computed for each light source and each color:
- Outward facing normal must be specified for each vertex.
- Analytic surfaces: cross product of partial differentials
- Polygonal surfaces:
- Points of continuity.
- Points of discontinuity.
Thomas P. Kelliher
2011-04-12
Tom Kelliher