Game Development Reference
In-Depth Information
Figure 7.8 Smoothing the object with subdivision.
edges it contains represent the basis of how to make a model, not the
model itself. In code we can take each triangle and split it into four
triangles by dividing each edge into two, or split the triangle into nine
by dividing each edge by 3, or divide each triangle into n 2 triangles by
dividing each edge by n , using an algorithm to position the new
vertices to result in a smoother looking mesh. Figure 7.8 shows the
effect of doing just this using the Lightwave 6.5 subdivision option.
There are many options to subdivision. Some methods retain the
shape of the control mesh with better accuracy than others. You can
see from the diagram that the method adopted by Lightwave has the
effect of shrinking the mesh so that the arms and legs appear slimmer.
The artist modelling the original cage can accommodate for this when
creating the original geometry, designing the cage so that the sub-
divided mesh looks correct at the expense of the control cage. In
Chapter 15 we explore the options for subdivision and look at the full
implementation of one system, butterfly subdivision. This method uses
interpolation, so the rendered subdivided mesh uses vertices from the
original cage in addition to the added vertices. Using butterfly subdivi-
sion with a subdivision of zero, the rendered mesh and the control
mesh are the same. With a subdivision of 1 it has a slight swelling
effect for a convex polygonal mesh, which can be controlled to a
certain degree using a weight parameter. Overall, butterfly subdivision
has the effect, with relatively low polygon cages, of retaining the shape
of the original more accurately.
Search Nedrilad ::




Custom Search