Game Development Reference
In-Depth Information
x i on the left) and deformed (
Figure 14.4.
Initial (
x i on the right) positions of a vertex i
and its neighbors.
14.3.2 Maintaining Surface Details and Shape Matching
Simulating the effect of surface connectivity based on a physical model is com-
plex. Using the physically correct material laws would not allow for real-time
simulation without cutting the geometrical complexity by too much. Fortunately,
we are in a lucky position since our simulation does not have to be realistic, it just
has to look realistic. And even most physical models are just approximations of
what is really going on. That is the way it works. There are also no rigid bodies
in nature, but there are some bodies that look and behave as if they were rigid.
We will use a technique called shape matching [Muller et al. 05] that approx-
imates the influence of the neighboring surface vertices for every vertex surpris-
ingly well.
The technique is absolutely nonphysical, but the result looks very realistic,
plus it has some important physical properties: it preserves the center of mass and
the angular momentum of the matched vertices. This way, it will not introduce
any net torque to the system. The basic idea is this: for each vertex, we calculate
the least-squares rigid body transformation of its neighbors rest positions and use
them as new goal positions. For those not familiar with the topic, this should be
explained in a little more detail.
When the mesh gets deformed, the vertex positions are no longer equal to the
rest positions of the mesh (se e Figure 14.4) .
Since the vertices are connected, they should be driven back into their rigid
shape by the influence of their nearest neighbors (see Figure 14.5) . The rigid
shape of the neighborhood does not have to be defined by the rest positions x i
because it is possible to translate and rotate the vertex cloud in whole, without
changing the relative shape of it.
Think of a mesh where each vertex has been moved by the same translation—
we could just move the rest position by the same translation as the vertices and
there will be no forces acting. What if the vertices have been displaced by dif-
Search Nedrilad ::

Custom Search