Game Development Reference
In-Depth Information
Figure 10.34
Two skinned vertices
Let's look at an example. Figure 10.34 shows two example skinned
vertices near the elbow of a robot. The blue and green dots show what a
vertex would look like if it were rigid to the corresponding bone, and the
cyan dot is the skinned vertex; notice that it stays attached to the surface
of the mesh.
The vertex on the right, closer to the shoulder, is influenced approxi-
mately 60% by the upper arm bone and 40% by the forearm bone. You
can see that as the arm bends, this vertex stays closer to the blue rigid
vertex. In contrast, the vertex closer to the hand appears to be influenced
approximately 80% by the forearm bone and only 20% by the upper arm
bone, and thus it stays closer to its green rigid vertex.
So a simple strategy for implementing skeletal animation might be as
follows. For each vertex, we keep a list of bones that influence the vertex.
Typically we set a limit on the number of bones that may influence any
one vertex (four is a common number). For each bone, we know the posi-
tion of the vertex relative to the bone's local axes, and we have a weight
for that bone. To compute the skinned vertex positions for a model in an
arbitrary pose, we need a transform matrix for each bone that tells how to
convert from bone coordinate space into modeling coordinate space. Vary-
ing these transform matrices over time is what makes the character appear
to animate.
Search WWH ::




Custom Search