426 10. The Rendering Engine
The term shading is oft en used as a loose generalization of lighting plus
other visual eff ects. As such, “shading” encompasses procedural deformation
of vertices to simulate the motion of a water surface, generation of hair curves
or fur shells, tessellation of high-order surfaces, and prett y much any other
calculation that’s required to render a scene.
In the following sections, we’ll lay the foundations of lighting that we’ll
need in order to understand graphics hardware and the rendering pipeline.
We’ll return to the topic of lighting in Section 10.3, where we’ll survey some
advanced lighting and shading techniques.
10.1.3.1. Local and Global Illumination Models
Rendering engines use various mathematical models of light-surface and light-
volume interactions called light transport models. The simplest models only ac-
count for direct lighting in which light is emitt ed, bounces off a single object in
the scene, and then proceeds directly to the imaging plane of the virtual cam-
era. Such simple models are called local illumination models , because only the
local eff ects of light on a single object are considered; objects do not aff ect one
another’s appearance in a local lighting model. Not surprisingly, local models
were the fi rst to be used in games, and they are still in use today—local light-
ing can produce surprisingly realistic results in some circumstances.
True photorealism can only be achieved by accounting for indirect light-
ing , where light bounces multiple times off many surfaces before reaching the
virtual camera. Lighting models that account for indirect lighting are called
global illumination models. Some global illumination models are targeted at
simulating one specifi c visual phenomenon, such as producing realistic shad-
Figure 10.22. The UDF scene with full lighting.