Character Animation Questions

Started by
4 comments, last by yosh64 16 years, 2 months ago
I'm new to the world of character animation, but basically I think (hope) that the process is something like this: Load model from file, should give one all the data to render the model: vertices's, texture coordinates, normals etc. But also some grouping (bone?/joint?) of vertices's that will be transformed together. Then each key frame is represented by a set of matrices for each bone. Then a certain animation as a walk-cycle, can be made up out of say 4 key frames which you interpolate between. So to render the animation we store the vertex, texture coordinates etc in a vertex buffer, and then we render the first frame by using the matrices in key frame 1. The we calculate the next set of matrices for the next frame by interpolating between the matrices in key frame 1 and 2 over a certain time. When we reach key frame 2 we start interpolating between 2 and 3, then 3 and 4. And then we start over again until the animation stops. A animation is often (always) in place, so the model never moves? To actually move the model forward when walking we also apply a translation in the direction we are walking. Is that a correct image? Now I'm trying to decide on a good model format to use for character animation. What options do I got? Pros, cons and limitation of each model format? Lizard
Advertisement

Hi,

Your idea of animation is correct, the model stays at place (most of the time) and it is moved by translation.

You can use matrices for storing the animation frames and as far as I know you can do interpolation with the matrices too. Another alternative is to store the animation as quaternion and use spherical interpolation for it. Although you'll need to store position,scale,rotation separately, the quaternions take slightly less memory. Of course, this depends on the format you'll choose.

About a model format, I can't give you suggestions.

Best regards!

Hi, i'm new to this forum ....
I don't Know anything about the game programing.........
My C++ & C are good .....
I also want to know something about game programing because i take interest in graphics in c++......

Please help me ....
Giving information like platform for making game program..........
please please
Quote:Original post by LizardCPPThen each key frame is represented by a set of matrices for each bone.


Quaternion for rotation, vec3 for translate (+ possibly vec3 for scale, but that introduces other problems). Less data that matrices.


Quote:Original post by LizardCPPA animation is often (always) in place, so the model never moves? To actually move the model forward when walking we also apply a translation in the direction we are walking.


That's upto you, but generally that method is not recommended since the translation during a walk is non linear. Normally you use LVE to extract the velocity of the root bone on the anim. This lets the animators just animate the character walking forward, and you compensate for it in code. Things like foot slip can be avoided if you use lve.

Quote:
Now I'm trying to decide on a good model format to use for character animation. What options do I got? Pros, cons and limitation of each model format?


fbx, collada or dotxsi - but you'll need to extract data from those to your own runtime format since they are not ideal for runtime usage.

Cal3d is ok and includes a runtime anim engine.

Quote:Original post by RobTheBloke
Quote:Original post by LizardCPPThen each key frame is represented by a set of matrices for each bone.


Quaternion for rotation, vec3 for translate (+ possibly vec3 for scale, but that introduces other problems). Less data that matrices.


Quote:Original post by LizardCPPA animation is often (always) in place, so the model never moves? To actually move the model forward when walking we also apply a translation in the direction we are walking.


That's upto you, but generally that method is not recommended since the translation during a walk is non linear. Normally you use LVE to extract the velocity of the root bone on the anim. This lets the animators just animate the character walking forward, and you compensate for it in code. Things like foot slip can be avoided if you use lve.

Quote:
Now I'm trying to decide on a good model format to use for character animation. What options do I got? Pros, cons and limitation of each model format?


fbx, collada or dotxsi - but you'll need to extract data from those to your own runtime format since they are not ideal for runtime usage.

Cal3d is ok and includes a runtime anim engine.


Thanks for your answer. Whats LVE?

Lizard
hey

When it comes to formats that support skeletal animation and such I would recommend either the directx .x format, or maybe the doom md5 format.

I've never really looked into the doom md5 format before, but I have a feeling it's probably easier to handle than the directx .x format ;).

Hmm, I've already posted links to docs and such for the directx .x format somewhere on these forums before (just search for such posts I've made, or I might dig them up later).

Anyhows I think docs about the doom md5 format might be hard to come by, but I've listed a few I know of below.

tfc duke - MD5Mesh and MD5Anim files formats, also checkout his demos and programs.

modwiki.net - MD5 (file format).

There is also an Unofficial DoomIII model specs v0.1 text file around, but I couldn't find it online :\. But I found it posted in this thread.

I've also made a few posts about such things on these forums before, I might dig em up later for ya. But for now I think you might find gamedev.net - Loading and displaying .X files without DirectX handy.

edit
Well I quickly dug up these threads for ya...

What to do with keyframe data in 3DS files?, well I gave links to docs and such for the directx .x format in one of my posts here.
Vertex Blending w/ Bones, made a big post about a skeleton system and vertex blending here. Although I didn't go into animation.

Anyhows I think these were the threads I was thinking of.

another edit
I forget to mention that I think it might even be worth thinking about designing your own format, and making a converter or exporter to this from another format. Well I originally made a converter from the directx .x format, and then I went onto making an exporter for blender to my own format.

cya

[Edited by - yosh64 on February 1, 2008 10:57:11 PM]

This topic is closed to new replies.

Advertisement