Game Development Reference
In-Depth Information
• The need to ensure that the vertex order does not change between key
frames: The only way we can reliably implement morph target animation
is if every vertex in the model is in the same position in the vertex stream
for every key frame. When exporting a 3D model from a modeling package,
the vertex stream order can end up changing between frames, which would
then cause our animation to behave incorrectly as vertices interpolate
between completely wrong positions.
For the reasons listed, Marmalade does not support morph target animations, though
it is fairly trivial to implement such an approach if you so wish. Morph targets can
still be extremely useful for tasks such as facial animation, which, with the increasing
power of mobile devices, may soon be a more common feature in mobile games.
Using boned animations
Most 3D video games will implement the animation of 3D models using a boned
animation system. This method works by allowing an animator to set up a skeleton
of virtual bones, which can then be used to deform the vertices of a 3D model. The
3D model itself often gets referred to as the skin for purposes of animation.
To set up a boned animation, the first step is to use a 3D modeling package to create
the 3D model you want to animate in its bind pose . The bind pose is normally
chosen to be a position in which it is easy to access every polygon in the model for
texturing and coloring purposes, as well as for laying out the skeleton. For a human
character this often means a pose where the arms are held outstretched horizontally
from the body and the feet are spaced a short distance apart.
With the bind pose created, the animator then starts the rigging process. This
involves adding the skeleton to the model by placing bones in relevant places. The
bones are linked together to form a hierarchy ; so whenever a bone is moved, all the
bones which are linked to it as children will move too. Ultimately there will be one
top-level parent bone in the hierarchy and this is called the root bone .
For performance reasons it is good to keep the number of bones to a minimum,
but this must be balanced against having enough to allow good quality animation.
The following diagram shows what the 3D skier character used in our example
game project looks like after being rigged:
 
Search WWH ::




Custom Search