Game Development Reference
In-Depth Information
Figure 10.26
The visual contribution of each of the components of the lighting equation
The ear is lit just as bright as the nose, even though it is actually in
the shadow of the head. For shadows, we must determine whether
the light can actually “see” the point being shaded, using techniques
such as shadow mapping.
In the first two images, without ambient light, the side of the head
that is facing away from the light is completely black. In order to
light the “back side” of objects, you must use ambient light. Placing
enough lights in your scene so that every surface is lit directly is
the best situation, but it's not always possible. One common hack,
which Mitchell et al. [47] dubbed “Half Lambert” lighting, is to bias
the Lambert term, allowing diffuse lighting to “wrap around” to the
back side of the model to prevent it from ever being flattened out
and lit only by ambient light. This can easily be done by replacing
the standard n l term with α + (1 − α)( n l ), where α is a tunable
parameter that specifies the extra wraparound effect. (Mitchell et al.
suggest using α = 1/2, and they also square the result.) Although
this adjustment has little physical basis, it has a very high perceptual
benefit, especially considering the small computational cost.
With only ambient lighting, just the silhouette is visible. Lighting is
an extremely powerful visual cue that makes the object appear “3D.”
The solution to this “cartoon” effect is to place a su cient number
of lights in the scene so that every surface is lit directly.
Speaking of multiple lights, how do multiple light sources work with the
lighting equation? We must sum up the lighting values for all the lights.
To simplify the notation, we'll go ahead and make the almost universal
assumption that s spec = s diff . Then we can let s j denote the color of the
 
Search WWH ::




Custom Search