MD3 file format

Started by
6 comments, last by CadetUmfer 16 years, 10 months ago
Hey, I just finished a MD2 loader/renderer and a OBJ loader/renderer, so I want to give a go at MD3 (should be fun dealing with the animation :)). Anyways, I can't really seem to find much documentation on the format. Besides this: http://linux.ucla.edu/~phaethon/q3a/formats/md3format.html is there any other docs on it? Thanks
Advertisement
That's a pretty thorough description of it. Especially if you're already familiar with MD2, it should make some sense. Is there a part of it you're hung up on?
We''re sorry, but you don''t have the clearance to read this post. Please exit your browser at this time. (Code 23)
That's pretty much all the information you'll need to know.

Keep in mind that if you're using a PowerPC Mac you should also pay attention to endianness [smile].
What I'm mainly confused it, the animation (is it keyframe, or bones?), what tags are, and how the model is actually composed of several different models and file (what is .cfg file, the .skin, .shader). I can give a guess of the purpose of the file, but how they're actually used and the specifications, I have no clue.

Thanks,
Bronx
- Keyframe animation
- Tags align different model pieces (i.e. tag_torso on head.md3 and tag_head on upper.md3 will line up...it's more complicated but that's the general idea)
- animation.cfg is a list of animations and their relevant frames (the file is commented)
- skin files I'm not quite so sure on, but they're simpler.

You can look at the quake 3 source for more information if you're patient.
Do you know what file specifically all the MD3 code is contained in? I went through several dozen files, but couldn't find it.

Thanks again!
The loader is mostly in renderer/tr_model.c (R_LoadMD3) and skin files in renderer/tr_image.c (RE_RegisterSkin). Most of the remainder is spread throughout cgame, but you'd probably be interested in the tag functions (CG_PositionEntityOnTag in cg_ents.c) and animation (there's a whole chunk of cg_players.c labeled "PLAYER ANIMATION", those should be the most helpful functions).

I understand that the Q3 code can be complex, but it's probably the best resource for understanding how MD3s should be handled. [smile]
Here are some viewers for MDL/MD2/MD3/MD5.
Anthony Umfer

This topic is closed to new replies.

Advertisement