Skip to main content
gamedev.net
🔒 Locked

Character Animation

Started by AAAP 5 replies 900+ views
Original Post
AAAP
AAAP
Just wanted to know how character animation tends to be represented in files, like for instance, bone hierarchies and stuff. I looked in the articles for this kind of thing and didnt seem to find anything very useful. It's hard to find a resource on that online. Also, wanted to know about how keyframing models is represented in most file formats. [Edited by - AAAP on January 20, 2006 5:34:35 PM]
|aaap.penopticon.com| My website, including game projects. Collaboration/comments are welcome, please visit :)
nef
nef
I havn't really messed with bone heigharchies but i have done keyframing and vertex animation.


Basic Vertex keyframe format:

uint uiTotalVerts;
uint uiTotalTriangles;

triangle vTriangles[];

uint uiTotalAnimations;

char szAnimationName[255];
uint uiTotalKeyFrames
vertex vKeyFrameData[];

// ... do that for how ever many animations you have

You can load in the triangle array that indexes into the vertex array to render the mesh. Than you have multiple vertex arrays for each keyframe. The animation system can interpolate from keyframe to keyframe from there.
AAAP
AAAP
thats what I thought keyframing would be like to be honest... i really want to learn how to implement bone hierarchies though :l not finding really ANY info on it.. thanks for answering tho i was starting to think nobody cared :(
|aaap.penopticon.com| My website, including game projects. Collaboration/comments are welcome, please visit :)
daktaris
daktaris
Look at the .X format in the DirectX SDK. In fact, in the media folder look at tiny.x (should be the girl using the walk cycle). Look for the section that begins with AnimationKey. This will be the animation's entire keyframe sequence for a single bone. So at keyframe 80, for example, the file will contain this info:
80;16;0.000000,1.000000,-0.000000,0.000000,-1.000000,0.000000,0.000000,0.000000,0.000000,0.000000,1.000000,0.000000,27.423260,34.577141,-0.000001,1.000000;;,

which is probably a rotation matrix and an offset from the parent bone (or an absolute position not for sure).

Also, keyframe animation can be stored in f-curves and tangent weights which reduces the amount of info you have to store.
Black Knight
Black Knight
This article explains skeletal anim and loads milkshape models.
http://rsn.gamedev.net/tutorials/ms3danim.asp
I found it quite usefull.
AAAP
AAAP
thanks for the directmesh2 link, its very interesting. thanks for the demo as well.
|aaap.penopticon.com| My website, including game projects. Collaboration/comments are welcome, please visit :)

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.