# Skeletal animation (joint, interpolation)

## 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 this post

##### 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 this post

##### Share on other sites
[quote name='Itun' timestamp='1302969026' post='4799154']
[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]
[/quote]

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

#### Share this post

##### Share on other sites
Your answer helps me. Thank you!

## Create an account or sign in to comment

You need to be a member in order to leave a comment

## Create an account

Sign up for a new account in our community. It's easy!

Register a new account

## Sign in

Already have an account? Sign in here.

Sign In Now

• ### Forum Statistics

• Total Topics
628381
• Total Posts
2982360

• 10
• 9
• 15
• 24
• 11