Game Development Reference
In-Depth Information
Figure 4.9 Averaged vertex normals (a). Vertex A on the cube uses one of three
different normals, depending on the face (b).
Remember that a triangle technically has two normals, depending on the order
in which the cross product is performed. For triangles, the order depends on the
winding order , which can either be clockwise or counterclockwise. Suppose a tri-
angle has the vertices A, B, and C in a clockwise winding order. This means that
travelling from A to B to C will result in a clockwise motion, as in Figure 4.10(a) .
This also means that when you construct one vector from A to B, and one from B
to C, the cross product between these vectors would point into the page in a right-
handed coordinate system. The normal would point out of the page if instead A to
B to C were counterclockwise, as in Figure 4.10(b) . As with other things we've
discussed, it doesn't matter which winding order is selected as long as it's consist-
ent across the entire game.
Search WWH ::




Custom Search