# Skeletal animation (joint, interpolation)

This topic is 2582 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

[font=Arial,]Advise me how to store joints matrix (different transformations, matrices, quaternions, dual quaternions, etc )? And how to store interpolation information about animation(angles, quaternion, dual quaternion, matrices and etc)?[/font]

##### Share on other sites
My method I use for my games lets me have ragdoll and multiple keyframes active at the same time and even lets you make the keyframes in a slightly easier way by dragging points around instead of rotating bodies.
I actually construct a stick man, each stick has an origin and an end, you then select a group of vertices that sit on each bone. This way, all I have to do is manipulate the skeleton and the model will obey its orientations.
Each frame, on the cpu I check the orientation of each stick on the stickman (youll need a spin vector for each stick too) then construct an orientation matrix for every stick, wherever the stick points, that part of the model follows. And you dont have to worry about quaternions or anything like that.

Just basicly.
100
010
001

except point the matrix towards the bone.

Then once youve constructed all the matrices, then you just send em to the gpu and for whatever bone each vert is id'd to, multiply by that matrix.

Its a little like just sitting completely separate models together in a group, each with their own translation and rotation, except this time its all segments of the same model.

##### Share on other sites

[font="Arial,"]Advise me how to store joints matrix (different transformations, matrices, quaternions, dual quaternions, etc )? And how to store interpolation information about animation(angles, quaternion, dual quaternion, matrices and etc)?[/font]

You should probably use dual quaternions for the rigid part of the joints transform. If you need scale, store that in a seperate matrix or vector(a 3x3 matrix if you support off axis scale). Then you can do a linear interpolation for the stretch(scale) matrix and perform the usual dual quaternion blending or skinning for the rigid part during animation.

Check out the article concerning matrix decomposition for animation in one of the Graphics Gems book for a robust, if somewhat expensive routine to perform the conversion from a matrix to its individual parts.

David

• 35
• 15
• 9
• 23
• 10