# Skeletal animation - keyframe matrix?

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

## Recommended Posts

Hi, Recently, I'm trying to create a model format with skeletal animation, and an MS3D exporter. So the problem I find, is interpolation between keyframes - as every keyframe looks for me just like a modelview matrix element (local translation & rotation), I thought I would simply mutliply it with parent node modelview matrix, and repeat until reaching the root node (of course in father-first order). But if I would have to interpolate between to keyframes, I don't know how to do it. Would be easier to have euler rotations in keyframes, but according to some tutors mentioning about some "Gimbal's Lock", this sounds unstable. Do I have to implement (and learn first :) ) quaternions? Or is it possible to bypass it? And if it is, how to do it (tutors, links?) ?

##### Share on other sites
Quote:
 So the problem I find, is interpolation between keyframes - as every keyframe looks for me just like a modelview matrix element (local translation & rotation), I thought I would simply mutliply it with parent node modelview matrix, and repeat until reaching the root node (of course in father-first order). But if I would have to interpolate between to keyframes, I don't know how to do it.

Interpolating involves taking two values and figuring out the 'mix' between them based on the current time and the start/end times of the two values. Research methods called linear interpolation('LERP') and spherical linear interpolation('SLERP'), for an example: http://www.euclideanspace.com/maths/algebra/realNormedAlgebra/quaternions/slerp/

Quote:
 Would be easier to have euler rotations in keyframes, but according to some tutors mentioning about some "Gimbal's Lock", this sounds unstable.Do I have to implement (and learn first :) ) quaternions? Or is it possible to bypass it?

I think the tradition for keyframe interpolation is to use quaternions which are easily converted into matrix form.

http://www.gamasutra.com/features/19980703/quaternions_01.htm
http://www.euclideanspace.com/threed/animation/keyframing/index.htm

##### Share on other sites
everything is here -> http://rsn.gamedev.net/tutorials/ms3danim.asp

it does work for me

##### Share on other sites
I have found that using quaternions is the best option. D3DX implements these for you.

1. 1
Rutin
33
2. 2
3. 3
4. 4
5. 5

• 13
• 76
• 11
• 10
• 14
• ### Forum Statistics

• Total Topics
632968
• Total Posts
3009583
• ### Who's Online (See full list)

There are no registered users currently online

×