Topic : Texture Mapping
Author : Thierry Tremblay
Page : << Previous 2  
Go to page :


is needed through the computations. Just before rendering, we can compute the missing vector.

The texture plane

A texture plane contains the three needed components:

- The U vector. This vector determines the U axis orientation of the texture space. It is NOT necessarily a unit vector, and as such it also provides a scaling factor for the U axis.
- The O vector. This is a translation to apply and represent the origin of texture space. It is used to align a texture on a polygon.
- The V / U scale factor. Since we are not keeping the V vector anymore, we need this to defines the scaling of the V axis.

Algorithm

Here is the algorithm to find textures coordinates:

- transform U and O from object->world->view space
- compute the missing V vector (V = U * N * scaleVU)
- compute P and Q
- compute the factors needed for 1 / W, S and T
All of this is in the FTTexturePlane class. Take a look for more details. The W vector is M,N,O, the S vector is J1,J2,J3 and the T vector is K1,K2,K3.


Page : << Previous 2