Game Engine Architecture

(Ben Green) #1

504 11. Animation Systems


In general, the global pose (joint-to-model transform) of any joint j can be
writt en as follows:
0
jMpii( ),
i

→→
=

PP=∏
j

(11.1)


where it is implied that i becomes p(i) (the parent of joint i) aft er each iteration
in the product, and p(0)≡M.

11.3.3.1. Representing a Global Pose in Memory
We can extend our SkeletonPose data structure to include the global pose
as follows, where again we dynamically allocate the m_aGlobalPose array
based on the number of joints in the skeleton:
struct SkeletonPose
{
Skeleton* m_pSkeleton; // skeleton + num joints
JointPose* m_aLocalPose; // local joint poses
Matrix44* m_aGlobalPose; // global joint poses
};

11.4 Clips


In a fi lm , every aspect of each scene is carefully planned out before any anima-
tions are created. This includes the movements of every character and prop in
the scene, and even the movements of the camera. This means that an entire
scene can be animated as one long, contiguous sequence of frames. And char-
acters need not be animated at all whenever they are off -camera.

0

12

3 45

xM

yM

Figure 11.8. A global pose can be calculated by walking the hierarchy from the joint in
question towards the root and model space origin, concatenating the child-to-parent (local)
transforms of each joint as we go.
Free download pdf