July 13, 2011
Lights and the Component Colors of a Standard Material
As the names of a standard material's color components imply, the kind of light that strikes a surface with a material determines how the surface appears when it is shaded. Ambient color appears where the surface is lit by ambient light alone (where the surface is in shadow). Diffuse color appears where light falls directly on the surface. It is called "diffuse" because light striking it is reflected in various directions. Highlights, on the other hand, are reflections of light sources.
Specular highlights appear where the viewing angle is equal to the angle of incidence. Glancing highlights appear where the angle of incidence is high, relative to the observer or camera (that is, the light ray is nearly parallel to the surface). Shiny surfaces usually have specular highlights. Glancing highlights are characteristic of metallic surfaces.
Some surfaces are completely reflective, or nearly so. These reflect their environment as well as the light sources that illuminate them. To model such surfaces, you need to use reflection mapping or ray tracing (see Raytrace Material).
The three color components blend at the edges of their regions. Between ambient and diffuse, the blending is calculated by the shader. Between diffuse and specular, you set the amount of blending by using the standard material's highlight controls.
