Game Development Reference
7.3 Diffuse Reflection
A diffuse surface is one for which part of the light incident on a point on the sur-
face is scattered in random directions. The average effect is that a certain color of
light, the surface's diffuse reflection color, is reflected uniformly in every direc-
tion. This is called the Lambertian reflection, and because light is reflected equal-
ly in every direction, the appearance of the Lambertian reflection does not de-
pend on the position of the observer.
As shown in Figure 7.2, a beam of light having a cross-sectional area A illu-
minates the same area A on a surface only if the surface is perpendicular to the
direction in which the light is traveling. As the angle between the normal vector
and the light direction increases, so does the surface area illuminated by the beam
of light. If the angle between the normal vector and light direction is θ , then the
surface area illuminated by the beam of light is equal to co A θ . This results in a
decrease in the intensity of the light per unit surface area by a factor of cos θ .
The value of cos θ is given by the dot product between the normal vector N
and the unit direction to the light source L . A negative dot product means that the
surface is facing away from the light source and should not be illuminated at all.
Thus, we clamp the dot product to zero in our illumination calculations.
We can now begin to construct a formula that calculates the color of light
that is reflected toward the viewer from a given point Q on a surface. This formu-
la is written in terms of the intensity of each of n lights illuminating the point
Q , which is constant for directional light sources and is given by Equations (7.3)
and (7.4) for point and spot light sources. The reflected light is modulated by the
Figure 7.2. The surface area illuminated by a beam of light increases as the angle θ be-
tween the surface normal and direction to the light increases, decreasing the intensity of
incident light per unit area.
Search Nedrilad ::