Game Development Reference
In-Depth Information
techniques for animating characters is skeletal animation, although it is
certainly not limited to this purpose. The easiest way to appreciate skeletal
animation is to compare it to other alternatives, so let's review those first.
Let's say we have created a model of a humanoid creature such as a
robot. How do we animate it? Certainly, we could treat it like a chess piece
and move it around just like a box of microwavable herring sandwiches or
any other solid object—this is obviously not very convincing. Creatures
are articulated, meaning they are composed of connected, movable parts.
The simplest method of animating an articulated creature is to break the
model up into a hierarchy of connected parts—left forearm, left upper arm,
left thigh, left shin, left foot, torso, head, and so on—and animate this
hierarchy. An early example of this was Dire Straits' Money for Nothing
music video. Newer examples include practically every PlayStation 2 game,
such as the first Tomb Raider. The common feature here is that each part
is still rigid; it does not bend or flex. Hence, no matter how skillfully the
character is animated, it still looks like a robot.
The idea behind skeletal animation is to replace the hierarchy of parts
with an imaginary hierarchy of bones. Then each vertex of the model is
associated with one or more bones, each of which exert influence over the
vertex but do not totally determine its position. If a vertex is associated
with a single bone, then it will maintain a fixed offset relative to this bone.
Such a vertex is known as a rigid vertex, and that vertex behaves exactly
like any vertex from the first Laura Croft model. However, more generally,
a vertex will receive influence from more than one bone. An artist needs
to specify which bones influence which vertices. This process is known as
skinning, 18 and a model thus annotated is known as a skinned model. When
more than one bone influences a vertex, the animator can distribute, per
vertex, differing amounts of influence to each bone. As you can imagine,
this can be very labor intensive. Automated tools exist that can provide a
quick first pass at the skin weights, but a well-skinned character requires
expertise and time.
To determine the animated position of a vertex, we iterate over all the
bones that exert some influence over the vertex, and compute the position
that the vertex would have if it were rigid relative to that bone. The final
vertex position is then taken as the weighted average of those positions.
18 You might also hear the term rigging, but this term can imply a wider range of tasks.
For example, often a rigger creates an extra apparatus that assists with animation but
is not used directly for rendering.
Search WWH ::




Custom Search