In production environments, animators use specialized tools, such as Autodesk 3DS Max, to generate animations of 3D models with keyframes. For each animation for each model, the animator creates several poses for the model, called key frames, which are then exported to the game data format.
Then the game loads these key frames and animates the model at a specific time, it selects the two closest key frames and interpolates between them to ensure smooth animation even with a small number of key frames.
Animated models are usually built with a hierarchy of bones. There is a root bone that controls the location and orientation of the model in the game world. All other bones are defined relative to some parent bone to create a tree. Each vertex of the model is attached to a specific bone, so the model can be controlled with a much smaller number of parameters: the relative positions, orientations and scales of each bone.
Smooth skinning is a technique used to improve the quality of an animation. With a smooth skinning, the vertex is not attached to one bone, but it can be attached to several bones (usually a hard limit is set, such as 4, the vertices rarely need more than 3) with appropriate weights. This makes the animatorโs job more difficult, as he should do a lot more work with vertices around the joints, but the result is a smoother animation with less distortion around the joints.
Alternatively, some games use procedural animation in which animation data is created at run time. The positions and orientations of the bones are calculated according to some algorithm, such as inverse kinematics or ragdoll physics . Of course, other options are available, but they must be encoded by programmers.
Instead of procedurally animating the bones and using forward kinematics to locate all the vertices of the model, another option is to simply process the position of each vertex yourself. This allows you to use more complex animations that are not connected by a hierarchy of bones, but, of course, it is much more complicated and much more difficult to do well.
Adam rosenfield
source share