Chapter 19. Animated 3D Sprites
This chapter and the next deal with sprite animation. The Sprite3D class of Chapter 18 possesses a rudimentary kind of animation, allowing the entire sprite to be moved over the XY plan and rotated around the y-axis. The kind of animation we'll be discussing here allows parts of the figure to move; for example, to have a robot wave its arms, jump, or turn its head.
There are three common animation approaches:
Keyframe animation
Figure articulation
Figure articulation with skinning
Keyframe animation is similar to the technique used in the 2D Sprite class from Chapter 11. However, instead of using a sequence of 2D images, a sequence of 3D models is used. Each model is represented by the same figure but is positioned slightly differently; rapid switching between the models creates the illusion of sprite movement. Poses can be organized into an animation sequence, so, for example, walking is represented by a sequence of different leg positions. A sequence is typically triggered by the user pressing a key (e.g., the down arrow, to move the sprite forward) or by other external events. A simple keyframe animation system is developed in this chapter.
Figure articulation represents a figure (or any articulated model) as a series of interconnected components. These components typically represent the limbs of a figure and can be moved and rotated. The movement of one limb affects the limbs connected to it, usually through the process of forward or inverse kinematics. ...