Game Engine Architecture

(Ben Green) #1
611

12.3.4.6. Arbitrary Convex Volumes


Most collision engines permit arbitrary convex volumes to be constructed by
a 3D artist in a package like Maya. The artist builds the shape out of polygons
(triangles or quads). An off -line tool analyzes the triangles to ensure that they
actually do form a convex polyhedron. If the shape passes the convexity test,
its triangles are converted into a collection of planes (essentially a k-DOP), rep-
resented by k plane equations, or k points and k normal vectors. (If it is found
to be non-convex, it can still be represented by a polygon soup—described in
the next section.) This approach is depicted in Figure 12.6.
Convex volumes are more expensive to intersection-test than the simpler
geometric primitives we’ve discussed thus far. However, as we’ll see in Sec-
tion 12.3.5.5, certain highly effi cient intersection-fi nding algorithms such as
GJK are applicable to these shapes because they are convex.


12.3.4.7. Poly Soup


Some collision systems also support totally arbitrary, non-convex shapes.
These are usually constructed out of triangles or other simple polygons. For


Figure 12.6. An arbitrary convex volume can be represented by a collection of intersecting
planes.


Figure 12.7. A poly soup is often used to model complex static surfaces such as terrain or
buildings.


12.3. The Collision Detection System

Free download pdf