Game Development Reference
In-Depth Information
Figure 15.4 Adding a vertex edge using the Catmull-Clark subdivision scheme.
The scheme is quite simple to implement. Step 1: for each polygon, add
a centre vertex that is the average of the four vertices in the polygon. Step
2: for each edge, add a new vertex that is positioned at the average of the
edge end-points and the adjacent polygon vertices (see Figure 15.4 for an
illustration of the vertices to consider).
The final step is to move the original vertices in the mesh using the
following rule:
N -2 v
N
1
N 2
N -1
V =
+
i =0 ( e i + f i )
where V is new vertex location, v is the old vertex location, N is the vertex
valence, e i is the vertex in the original mesh indicated in Figure 15.5 and
f i is the vertex in the new mesh indicated in Figure 15.5.
This step introduces a new term, valence. The valence of a vertex is
simply the number of edges that use that vertex. For a regular
quadrilateral mesh the valence of each vertex will be four.
Because the original vertices are not part of the final mesh in a
Catmull-Clark scheme, there are significantly more calculations to
perform when subdividing. This computational expense and a resultant
mesh that can be very different from the control mesh encourage us to
use an interpolating scheme rather than an approximating scheme like
Catmull-Clark.