Game Development Reference
In-Depth Information
The three light sources are shown in the following diagram:
A
A
A
B
Directional Light
B
Point Light
B
Spotlight
Ambient lighting
All game scenes have at least one ambient light that produces a uniform
illumination. The properties of ambient light are as follows:
• It is generated by a nondirectional light source
• It simulates light that has been reflected so many times from so many
surfaces that it appears to come equally from all directions
Its intensity is constant over a polygon's surface
The position of the viewer is not important
Its intensity is not affected by the position or orientation of the polygon
in the world
It is generally used as a base lighting in combination with other lights
The following formula calculates the intensity of light after reflection from an object
which has ambient properties:
I = Ia Ka
The parameters of the preceding formula are as follows:
I : Intensity
Ia : The intensity of the ambient light
Ka : The object's ambient reflection coefficient; 0.0 to 1.0 for each of the R, G,
and B values
Diffuse reflection (Lambertian reflection)
Diffuse reflection is the reflection of light from a surface such that an incident ray
is reflected at many angles rather than just one angle. The properties of diffuse
reflection are as follows:
The brightness of a polygon depends on theta—the angle between the surface
normal (N) and the direction of the light source (L)
 
Search WWH ::




Custom Search