Game Development Reference
Figure 9.11. The edge collapse cost calculation allows the collapse of an edge between
two triangles having largely differing orientations as long as the triangle mesh is reasona-
bly flat on both sides of the edge.
If either A or B lies on the negative side of the edge, then we replace d with the
TT if it is smaller:
It is possible that both of the operations given by Equations (9.36) and (9.37) are
performed for a single triangle.
The edge collapse cost calculation presented in this section allows the col-
lapse of an edge such as that shown in Figure 9.11. As long as the triangle mesh
is reasonably flat on both sides of the edge, a collapse may occur along an edge
between two triangles having largely differing orientations.
Figure 9.12 shows the original triangle mesh for a chunk of terrain and the
same surface after 35 percent of its triangles have been eliminated using the edge
collapse technique. Notice how edges in regions of high triangle concentration
and regions of relative flatness were the first edges chosen to be removed.
9.5 T-Junction Elimination
Suppose that a scene contains two polygons that share a common edge, as shown
in Figure 9.13(a). When two such polygons belong to the same model, the verti-
ces representing the endpoints of the common edge are not ordinarily duplicated
unless some vertex attribute (such as texture coordinates) is different for the two
polygons. Vertices shared by multiple polygons are usually stored once in an ar-
ray and referenced multiple times by the polygons that use them. Graphics hard-
ware is designed so that when adjacent polygons use exactly the same coordi-
nates for the endpoints of shared edges, rasterization produces sets of pixels that
Search Nedrilad ::