i
i
i
i
i
i
i
i
6.1. The Texturing Pipeline 149
ple. Texturing works by modifying the values used in the shading equation.
The way these values are changed is normally based on the position on the
surface. So, for the brick wall example, the diffuse color at any point on
the surface is replaced by a corresponding color in the image of a brick
wall, based on the surface location. The pixels in the image texture are
often called texels, to differentiate them from the pixels on the screen. The
gloss texture modifies the gloss value, and the bump texture changes the
direction of the normal, so each of these change the result of the lighting
equation.
Texturing can be described by a generalized texture pipeline. Much
terminology will be introduced in a moment, but take heart: Each piece of
the pipeline will be described in detail. Some steps are not always under
explicit user control, but each step happens in some fashion.
A location in space is the starting point for the texturing process. This
location can be in world space, but is more often in the model’s frame of
reference, so that as the model moves, the texture moves along with it.
Using Kershaw’s terminology [646], this point in space then has a projector
function applied to it to obtain a set of numbers, called parameter-space
values, that will be used for accessing the texture. This process is called
mapping, which leads to the phrase texture mapping.
1
Before these new
values may be used to access the texture, one or more corresponder func-
tions can be used to transform the parameter-space values to texture space.
These texture-space locations are used to obtain values from the texture,
e.g., they may be array indices into an image texture to retrieve a pixel.
The retrieved values are then potentially transformed yet again by a value
transform function, and finally these new values are used to modify some
property of the surface, such as the material or shading normal. Figure 6.2
shows this process in detail for the application of a single texture. The
reason for the complexity of the pipeline is that each step provides the user
with a useful control.
object
space
location
projector
function
corresponder
function(s)
obtain
value
value
transform
function
parameter
space
coordinates
texture
space
location
texture
value
transforme
texture
value
Figure 6.2. The generalized texture pipeline for a single texture.
1
Sometimes the texture image itself is called the texture map, though this is not
strictly correct.