MD3 Model Questions

Post your questions, suggestions and experiences regarding to Image manipulation, 3d modeling and level editing for the Irrlicht engine here.
Post Reply
g0bl1n
Posts: 63
Joined: Thu Feb 21, 2008 8:45 am

MD3 Model Questions

Post by g0bl1n »

I'm a complete noob when it comes to models and modeling (I'm a programmer doing my own modeling...don't know how well this will go...but anyways). I had a few questions about MD models in general.

1. I assume that the number in MD2, MD3, and MD5 mean there are 2, 3, and 5 different "sub-models" that can be animated individually from each other?

2. When creating animations are you limited to the number of animations and the frame count in each of the animations? (I ask because I was searching google and came across this page that shows the Quake III animations: LINK)

3. Are the animations stored in the model file (*.MDx) or are the animations stored in the Irrlicht function (such as EMAT_RUN=frames 107 to 119)?

4. Recommendations of which 3D program to use? I've heard good things about 3dsmax. But there are several others and I just wanted to see what was being used out there.

Thanks!
shadowslair
Posts: 758
Joined: Mon Mar 31, 2008 3:32 pm
Location: Bulgaria

Post by shadowslair »

Ok, I`m not a specialist too, so I may mislead you somehow, but here`s what I know from my humble experience:

1. AFAIK the .md2 and .md3 are just per-vertex animated (or could be static too with only one frame) models, with some differences in the format, where .md3 allows for some shader effects etc. The .md5 is the doom3 model format and is using bones. I`ve seen .mdl format too, which is using some skeletal animation (using bones) I`ve seen .mdl in the 3D Game Studio (MED) with the A5 engine many years ago.

2. The models for Q2 and Q3 may have some limitation because of the engine that uses them. If you`re not using it (I assume you don`t) so you are not limited in the frame number.

3. Um, the frames are stored all in the model file, but if you`re using not q2 or q3 model, you`ll need to call other frame ranges using the irrlicht functions, and not use the EMAT_WHATEVER calls. You`ll have the keyframe numbers from your modelling program.

4. It doesn`t really matter which program you use. I don`t know many programs exporting these formats animated, because I don`t use them. They`re quite old, but still can be used, depending on what are your requirements. 3dMax exports to .md2 using some plugin/script, but I personally have never used it. I`m sure Blender has such thing too, since there`re tons of plugins out there. Use the one youre more comfortable with.

PS: Try googleing for better info. :wink:
"Although we walk on the ground and step in the mud... our dreams and endeavors reach the immense skies..."
freetimecoder
Posts: 226
Joined: Fri Aug 22, 2008 8:50 pm
Contact:

Post by freetimecoder »

Blender can export md2 and md3 and is much cheaper than 3dsmax ;)
If you are not bound to md2/3 you could also use b3d or x, which supports bone animation. That allows you to make your character hold a sword or gun for example.

greetings
Kalango
Posts: 157
Joined: Thu Apr 26, 2007 12:46 am

Re: MD3 Model Questions

Post by Kalango »

g0bl1n wrote:I'm a complete noob when it comes to models and modeling (I'm a programmer doing my own modeling...don't know how well this will go...but anyways). I had a few questions about MD models in general.

1. I assume that the number in MD2, MD3, and MD5 mean there are 2, 3, and 5 different "sub-models" that can be animated individually from each other?

2. When creating animations are you limited to the number of animations and the frame count in each of the animations? (I ask because I was searching google and came across this page that shows the Quake III animations: LINK)

3. Are the animations stored in the model file (*.MDx) or are the animations stored in the Irrlicht function (such as EMAT_RUN=frames 107 to 119)?

4. Recommendations of which 3D program to use? I've heard good things about 3dsmax. But there are several others and I just wanted to see what was being used out there.

Thanks!
1. The numbers are the "versions" of IDSoftware mesh format. Quake uses MDL(1) Quake 2 uses MD2, Quake 3 uses MD3 and Doom3 uses MD5. MDL and MD2 formats allow only "one object" per mesh. MD3 allow up to 3 objects but that is used just to sync models in the Q3game correctly (using vertex control to make the mesh bend when mouse tracking)....

2. Whe YOU are creating the animations you can do whatevar you want. The listing of animations is for ppl who want to sync their models in quake3 and play with them in the game.

3. The animations are stored within the MD2 or MD3 formats, the MDX format is used with Half Life's MDL because there is a bone struct animation within. The irrlicht enumerations are used for MD2 files wich have sync-ed animations to fit in a Q2 game. When you are exportin your model to MD2 or MD3 you can name your animations and specify your animated frame range.

4. 3dsmax is a good app. You have to download a MD2~MD3 plugin separatedly tho. Blender is also a good app, tho is a bit harder to learn. Blender already have a md2 exporter(for the older versions) and it works pretty good. There is also a free version of 3dsmax 4, the gmax, wich have pluins to export for md3 and md2. I think you should try blender since its free and it updates quickly. You could also try other formats like .x and .md5(there are code snippets to handle md5 in the forums). MD5 imho is the best format yet, since irrlicht doesnt support collada animations yet. Anyway, good luck ;)
g0bl1n
Posts: 63
Joined: Thu Feb 21, 2008 8:45 am

Post by g0bl1n »

Thanks for all the info! But I have one last question, can you separate animations in .b3d and .x (i.e. the head, torso, and *legs). I'm thinking along the lines of coding.

Just having the upper and lower halves of the model separated/independently animated would making coding so much easier (such as having the legs at a walking animation and having the torso reload, shoot, fire, getting hurt, etc...).

I always thought that is how other games did it, but I'm no expert! If the answer to the question above is yes, then would that be done in game (in Irrlicht I mean) or in the modeling program?

Thanks!
shadowslair
Posts: 758
Joined: Mon Mar 31, 2008 3:32 pm
Location: Bulgaria

Post by shadowslair »

The easiest way to do this is like in q3: have 3(or more) meshes and each has its own animation. Then create 3 animated nodes. No matter the irr model format. You have one irr node- for example the lower body or hips and attach the upper body node as a child of it and the head node as a child of the upperbody (or joints), and then do whatever you want with them. The problem is, that they won`t be sharing the same mesh, meaning you`ll end up with one partially segmented mesh model. The nice thing is that you`ll be able to combine different bodies with different heads etc. This is nice for a beginner.

The more advanced way is to take the character model with bones and animate it in real time- rotate the bones an on. Problem is, that doing this will be quite hard for a beginner, so you better stick with the first method (for now).
"Although we walk on the ground and step in the mud... our dreams and endeavors reach the immense skies..."
Kalango
Posts: 157
Joined: Thu Apr 26, 2007 12:46 am

Post by Kalango »

Yes, the easiest way is to separate the meshes. The problem will come when you try to bend your model spine so it can "look" to the mouse direction (like aiming up, etc...).
g0bl1n
Posts: 63
Joined: Thu Feb 21, 2008 8:45 am

Post by g0bl1n »

Alright so separate meshes. Final question I swear! If I wanted to use ragdolls (I'm sure each physics engine is different, but I'm assuming\hoping that there is some sort of "standard") would I just include a model of a full body? Our would that particular model have to have some kind of skeleton?
Kalango
Posts: 157
Joined: Thu Apr 26, 2007 12:46 am

Post by Kalango »

g0bl1n wrote:Alright so separate meshes. Final question I swear! If I wanted to use ragdolls (I'm sure each physics engine is different, but I'm assuming\hoping that there is some sort of "standard") would I just include a model of a full body? Our would that particular model have to have some kind of skeleton?
Definitly a skeleton. But since your model is separated in many parts you can build your skeleton inside the code. The problem is that skinning will look awfull and it will be ovious that your moddel is split in pieces. For ragdoll i recomend skinned skeleton-ed models...

PS: If your model is a robot-like thing it wont make any diference since a robot is a joint of parts...
g0bl1n
Posts: 63
Joined: Thu Feb 21, 2008 8:45 am

Post by g0bl1n »

So while a character isn't dead/ragdoll use the split models, then when the character dies do an animation and then delete all the separate models and load in the skeleton'd ragdoll?

I know I said that that was my last question but I seem to run into more as I go. Would it be best to have a separate head for different "faces" or use a blank/smooth face and use different textures?
shadowslair
Posts: 758
Joined: Mon Mar 31, 2008 3:32 pm
Location: Bulgaria

Post by shadowslair »

g0bl1n wrote:So while a character isn't dead/ragdoll use the split models, then when the character dies do an animation and then delete all the separate models and load in the skeleton'd ragdoll?
No, he meant the whole animations (while still um.. alive?!) will look bad having segmented model, but it`s not necessarily true. Of course it highly depends on the type of game you make and the way you can/want do it. If you use segmented model for the whole game, there`s absolutely no problem to use it for the ragdoll. BUT, I think first thing first. You`ll see you`ll restructure tons of things as you go, will return after many months of work and reject something- like a puzzle you slowly arrange. Whatever you make it`ll be more or less temporary solution, trust me.
g0bl1n wrote:I know I said that that was my last question but I seem to run into more as I go. Would it be best to have a separate head for different "faces" or use a blank/smooth face and use different textures?
Don`t worry, we all know you`re just getting started and more and more questions will arise, but that`s the idea of the whole community- to learn, to teach and to learn while teaching. To help and get help. And on your question: remember that this is your game, meaning it`s what you create the way you want. So it`s all up to you. In the usual case, if you wanna simply change the skin color, add a tatoo, change eyebrows etc. you use different texture. But if you wanna add some hi-tech glasses, horns or anything that will affect the shape you come with another model and on. Just start thinking a bit on it. In most of the cases there`s no "best" or "perfect" solution. :wink:
"Although we walk on the ground and step in the mud... our dreams and endeavors reach the immense skies..."
Kalango
Posts: 157
Joined: Thu Apr 26, 2007 12:46 am

Post by Kalango »

As for the segmented mesh thing. I ment that when you activatte the ragdoll your model may bend and act unexpectedly, you wont be able to hide your details so good as you do when you animate your model in a controlled environment. When this happen the segmentation of your mesh may become obvious, taking a share of your game's graphic beauty. And also replacing the ragdoll isn't the best solution since its basicly the double of work to do.
I say you should try things, experiment wich fits best. You dont need to do it in your game/code yet, you could use a modelling app and test things, and later build it on in your game.
As for the coding difficulty, the both ways are basicly the same ton of code. There are stuff to sync and stuff to handle. The question is how polished you want your game to look in the end.
One good stuff about segmentation is that you can split, explode and handle bodyparts of your model a quite bit easily.
But when you do ragdolls using skinnin you can mantain grapic polishness and precision.
Its all about what you want actualy....
g0bl1n
Posts: 63
Joined: Thu Feb 21, 2008 8:45 am

Post by g0bl1n »

Thanks for the tips! I'm very interested in the in-game skeletolization. I've searched around and I haven't found much on the topic though. Can anyone point me in the direction of any topics or tutorials on the subject?
Post Reply