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.

Natural Materials

July 11, 2149

Most natural materials have a matte surface with little or no specular color. For natural materials such as these, use the following guidelines:

Ambient color: The ambient color depends on whether the scene is indoors or outdoors, as previously described.

Diffuse color: Choose a color found in nature. It is best to use the observed color of the object itself, or a similar object.

Specular color: Make the specular color the same hue as the diffuse, but with a highter value and a lower saturation.

Shininess: Set the shininess to a low value.

Some foliage, bird feathers, fish scales, and so on, are shiny. For materials such as these, set the shininess and shininess strength to higher values. You might also want to change the specular color so it's closer to the lighting color than the surface's diffuse color.

Water is reflective, and is best modeled by a color component in combination with a reflection map or a water map.