Skeletal animation - keyframe matrix?

Started by
2 comments, last by ouraqt 17 years, 7 months ago
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?) ?
Advertisement
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
http://blog.protonovus.com/
everything is here -> http://rsn.gamedev.net/tutorials/ms3danim.asp

it does work for me
OpenGL fanboy.
I have found that using quaternions is the best option. D3DX implements these for you.

This topic is closed to new replies.

Advertisement