Recommended Posts

Hi guys,
I''m about to start writing code to load 3d models into my game. But I''m not sure which format to use, because I don''t know a lot about how animation is stored in a file.
So, do all 3d files store animations with the models? And are animations usually skeleton-based? And is the animation usually saved as keyframes or as frame-by-frame data? And is there anything tricky I have to do if I want to use one animation for several models?
And I guess the money question is, which file format would you recommend?
Thanks for your expertise,
Andy

Share this post

Link to post

Share on other sites

>>So, do all 3d files store animations with the models?<<No not all 3D file formats store animation data.

>>And is the animation usually saved as keyframes or as frame-by-frame data?<<I doubt you find any with frame-by-frame animation. The reason being is the memory required to store every frame. Instead they use keyframes then use some kind of frame interpolation to blend in between the keyframes.

>>And is there anything tricky I have to do if I want to use one animation for several models?<<If there from the same type (IE Quake 3 models) they all (I believe) use the same animation data, just modeled different.

Heres what I mean:Heres the animation data for the Lara model (Quake 3)

>>And I guess the money question is, which file format would you recommend?<<Good question. I like .3ds, .md2, .md3, and .mdl. Milk shape isn''t that bad, it does bone animation i think. I don''t know, there all good. Just find one you like and go with it.

Share this post

Link to post

Share on other sites

If your 3D character and his ''items'' (hat, gun etc) are all part of one model then you pretty much have to load a whole new model to change any detail. On the other hand, your character could be made up of ''chunks'' and tags like the .md3 (Quake 3) model. The .md3 player model is actually multiple models (head, torso, legs) with vector tags that indicate where the gun models (separate models) attach and aim from. You could define a custom model type for your character and add more vector tags to your custom .md3. These tags would indicate where a cloak or hat or whatever would attach. You can use the same principle with .x file templates or come up with your own custom format. Best way is probably to learn all about an established format like .md2 or .md3 first.

0

Share this post

Link to post

Share on other sites

quote:Original post by UltimaX >>And is the animation usually saved as keyframes or as frame-by-frame data?<<I doubt you find any with frame-by-frame animation. The reason being is the memory required to store every frame. Instead they use keyframes then use some kind of frame interpolation to blend in between the keyframes.

Explain real slow what you are thinking is the difference between frame by frame and keyframe - when I hear keyframe I'm thinking "This frame for 1 frame, blend(interpolate) for 30 frames til the next frame" and so on, which is fine, that's how you'd block out a sequence, afaik. BUT, this is essentially the same as what I think of as 'frame by frame', except that with 'frame by frame' the frames are evenly spaced out (but in either schema you'd want to interpolate, afaik.) The way I'm plotting to handle frame by frame is to construct a timetable from either frame by frame or keyframe and set timers, bells, and whistles accordingly. My thoughts on the subject are almost certainly incomplete or incoherent, but you've piqued my curiousity, and I'm interested in hearring an extension to the above comment.

I'm currently working on an animation playback/creation program for the .glm / .gla file format, used in Jedi Knight 2, Soldier of Fortune 2, and soon Jedi Knight: Jedi Academy.