Game Development Reference
In-Depth Information
Vertex Count
If vertex count seems to be a mystery to you, there's good reason to be confused. There are two
main reasons the count may not add up to what it looks like it should be. Lighting and UV mapping
are the primary culprits. Besides containing location, diffuse, and alpha color information, vertices
also hold lighting and mapping information.
The simple spheres in Figure 4-22 all have 120 tris, or faces. Their vertex number varies greatly.
As long as the sphere is smooth and requires no mapping coordinates, what you see is what you
get. Sphere 1 has 62 vertices, with the tris sharing a vertex where the edges meet. When the model
is not smooth, as in sphere 2, vertices can no longer share the vertex normal (lighting) information
unless they are also coplanar. Sphere 2, faceted (nonsmoothed or shared vertices), has a count of
264 vertices.
Figure 4-22. Several spheres with the same triangle count of 120, but vastly different vertex counts
If it requires simple mapping coordinates, as with sphere 3, it will require more vertices because the
same vertex cannot exist at more than one position on the map. Figure 4-23 , far left, shows a typical
automatic mapping where a texture is wrapped around its circumference. As long as the texture is
solid at the top and bottom, it may be okay. If it is Unwrapped, as with sphere 4, it may have an even
higher count to accommodate the extra pieces (Figure 4-23 , left center). For this reason, unwrapping
a model becomes a study in compromise. Bigger pieces are easier to paint and will dictate a lower
vertex count. The downside is that they tend to be more distorted on organic models, and they may
not make efficient use of the texture map, so you will get less detail per pixel. Smaller pieces give
you the opposite pros and cons. The spheres can be inspected in the Chapter 4 assets, the Misc
Tests project, Mapping Spheres scene.
Figure 4-23. The unwrap UVs of spheres 3 and 4 and their respective texture maps
 
Search WWH ::




Custom Search