Storing a D Model

3D objects are a collection of primitives, typically either triangles or quads, that form part of a larger shape. For instance, a cube can be created with six quads, one for each side. More complex shapes, particularly organic shapes like people or bug-eyed aliens, take many more primitives to create. The most efficient way to store a model is to keep a list of vertices, and additional information about which points to use to draw the faces (primitives). For instance, a cube could be stored as six vertices (one for each corner), and the faces would be stored as four indexes into that list (see Figure 9-9).

This is typically how models are stored in files produced by 3D editing software. Although there are a variety of different formats, they will all contain a list of vertices and a list of indices that connect vertices together with primitives. We'll cover how to read these models later in this book.

Figure 9-9. Faces and vertices

Was this article helpful?

0 0

Post a comment