Game Development Reference
In-Depth Information
while (v>=1.0) v-=1.0;
while (v<0) v+=1.0;
ply->tc[i].x=(float)u;
ply->tc[i].y=(float)v;
}
Figure 6.6 shows an example of this mapping.
Figure 6.7 illustrates a potential problem. When generating coordinates
this way, it is possible to have a polygon that has a high value, say 0.87
for one side, and a value for the other side that is very low, say 0.0. The
left image in the diagram shows the result of this. The entire texture image
is mapped to the central polygons. In reality, we want the polygon to map
Figure 6.6 Example of spherical image mapping.
Figure 6.7 Problems with mapping.
Search Nedrilad ::




Custom Search