MD3 Model help - SOLVED
I need some help rendering MD3 models. What I have right now is a model that is broke into a head, torso and legs. I can render them fine separately, but I'm stumped on how to render it as a whole.
I know that in the Tags there is an orientation matrix and position associated with it but I couldn't find anything on what is held in the orientation. Does it have BOTH rotation and translation or just the rotation? Also, is it a transformation matrix or a quaternion?
I noticed that when I print out the position of head tag associated with the torso they are non-zero, while in the head model the head tag is 0,0,0. So what would be the best way to render all the parts? Should I render the torso, then for each tag, go to that position, apply the transformation and then render that part? Or do I have to search through all the other model parts and find a model that has that tag in it? (since its a bad idea to assume that all models have the same number of models and tags and names)
Once I get 2 parts connected, then the whole model can be loaded lol. Thanks in advance.
[Edited by - davek20 on May 16, 2007 10:07:36 AM]
I guess this would help ;)
http://rapidshare.com/files/31419184/MD3Animation_SDL.zip
Enjoy,
EnygmyX.
http://rapidshare.com/files/31419184/MD3Animation_SDL.zip
Enjoy,
EnygmyX.
Thanks for that link. It looks like it will help out a lot. Everything in there is nicely explained and EVERYTHING is commented :)
np ..... but be warned that since this code was meant to be a tutorial by the author therefore it is quite unoptimized and there are a few memory leaks even. So if you are planning to do something worthwhile quite a few optimizations will be needed like replacing all those matrix multiplications with quaternions etc.
EnygmyX.
EnygmyX.
Quote:Original post by enygmyx
np ..... but be warned that since this code was meant to be a tutorial by the author therefore it is quite unoptimized and there are a few memory leaks even. So if you are planning to do something worthwhile quite a few optimizations will be needed like replacing all those matrix multiplications with quaternions etc.
EnygmyX.
Ok, thanks for that heads up. I'm trying to make a game and using the MD3 models in it. I got it working with the head linked to the torso, but I found a problem that will happen later on with different models being loaded in and attached.
I looked at the animation.cfg file and it looks like it would solve this and keep things synced up. I found this sit with some info about the file format for the .cfg file http://education.mit.edu/starlogo-tng/shapes-tutorial/shapetutorial.html
I really don't see how that can be used to animate it? Like how would it sync the head and leg models with the torso?
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement