12.4. Displaying Textures on the Screen   

Texture mapping consists of taking the 2D texture map, applying it to a 3D object and then displaying that object on the screen using some projection. The first stage converts points from a texture space to an object space, and the second stage converts points from the object space into the screen space. The first stage is referred to as Surface Parameterization and the second stage is known as Screen Projection.


 
diagram taken from (Heckbert, 1986)
Fig. 12.3 : diagram taken from (Heckbert, 1986)
  Surface parameterization basically determines how a 2D texture map is to be applied to a 3D object. The texture map will often be "warped" to give the desired affect on the surface. This basically means that there is not always a one-to-one correspondence between points on the object surface and texels on the texture map. Several points on the object can correspond to one texel, which logically means that the texture map is being stretched; or a single point on the object may correspond to several texels, meaning the texture map is being compressed. This principle is demonstrated in the following diagram. Notice the effect of warping the checkered surface so that the texture map is stretched in some places and compressed in others. (Stretched toward the top left-hand corner and compressed toward the bottom right of the object).

 
Image from (modified) a PhD thesis by Robert C. Lansdale
Fig. 12.4 : Image from (modified) a PhD thesis by Robert C. Lansdale
The second stage in displaying textured objects is to transform the objects from the object space into the screen space. Basically this involves displaying the objects on the 2D screen in the way that they would appear in 3D. This process is known as screen projection, which is made up of modelling and viewing transformations. Each screen pixel must correspond to a point in 3D.