Archived

This topic is now archived and is closed to further replies.

vichollis

Blizzard MDX Model format

Recommended Posts

Just wanted to know if anyone is interested in loading Blizzard MDX models and if any of you guys have done this before. If you do not know already .MDX files are the models for games like Warcraft III, and Starcraft. I''m in the process of creating a Loader for the MDX format now. So far I can get the texture coords, vertex coords, normals, and indexes to a face array (In short draw a static model). The real challenge will be understanding the bone animation that is stored in the file. I was thinking about writing an article about this for NeHe when I''m finished I just want to know if anyone out there is willing to help me with trying to figure this file format out. Its a good oppurtunity to learn about bone animation. There are currently applications out there that will convert MDX files to an OBJ format however I do not know of any apps that will actually animate the model. The few apps I have found to do conversion do not come with the source code so its slow going at best. Anyway respond if your interested but before you do respond know that this is not going to be something that is easy to do. -Cheers

Share this post


Link to post
Share on other sites
I just started this same task about a month ago, I even thought of making a turtorial out of it. I can currently load the same items you have listed. And I also have some of the geometry animation working. I can load the human buildings with their animations cycles displayed properly. The test app renders the models at different times throughout the animation, and you can see all the animation sequences for each of the models, and some include moving parts (like the saws). My implmentation uses C++ and OpenGL.

There are very few resources on the file format, but I found one that defines approximately 90% of the info in the file, plus whatever I figured out.

I can load the .BLP image files as well, although I don''t think the alpha values get loaded.

BioWare''s Neverwinter Nights models are much easier to figure out, plus they have some for free download on their site.

I''m up for the challenge of the MDX file loader though.

Share this post


Link to post
Share on other sites
Cool, sounds like you have gone a further than I have.

"I found one that defines approximately 90% of the info in the file"

Were you talking about this site? http://kmkdesign.8m.com/downloads/ I have been to this site but it does not go into much detail at all. Is this the same one you were talking about? I look forward to working with ya on this btw.

Share this post


Link to post
Share on other sites
Several people at www.wc3campaigns.com have done this already, they have MDX->MDL converters (with anims), MDX importers and exporters (with anims) for varied 3d modeling programs such as 3dstudiomax and milkshape and many more things...

[edited by - Alura on October 21, 2003 3:58:37 PM]

Share this post


Link to post
Share on other sites
Well let me just say the idea here is to understand the file format. Once fully understood myself and others plan to write a doc on the mdx format. The idea is to be able to load mdx files directly into your own opengl projects. We are not making another converter, plug-in, or script. Instead gathering information about the file format to be put inside a doc for everyone to use. Then you can use the doc to write your own plug-in or whatever.

The folks at www.wc3campaigns.com have not done this already. They are going to send a petition to Blizzard for the MDX format. http://www.petitiononline.com/wc3mdx/petition.html They realize they don''t fully understand the MDX format and that is why they are going to ask blizzard to release it. Personally I don''t ever see this happening.

Share this post


Link to post
Share on other sites
vichollis: Yes, they don't completely understand it but they understand most of it, enought to get anims, they are ahead of you guys (as far as i know), check on their irc if ya want to contact with some of them, specially CitizenSnips and republicola (authors of the 3dsmax mdx exporter).

[edited by - Alura on October 23, 2003 4:53:33 PM]

Share this post


Link to post
Share on other sites
it IS fully understood. what was holding them back was the math in converting the way max stores quats to the way wc3 stores them. i understand it fully, i made an exporter that supports animations for milkshape. i dont really have a need for what you are doing, but if you guys want some help with the bone rotation ill be glad to help. another thing, there is some code in the wc3 exe (i think thats where it is) to convert mdx files to an ascii format and back again. this is what i used so i didnt have to mess with binary, and so did citizensnips and republicola.

if you want to talk to me, republicola or citizensnips go to #wc3campaigns on irc.wc3campaigns.com . at least one of us should be there most times.



[edited by - kyldub on October 23, 2003 4:47:44 PM]

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
There are already some really fine documents about the mdx file format. You should search for one made by nub on www.wc3campaigns.com, that one is likely the most detailed. But basicly, in-engine, the game converts the mdx files to mdl format, which is asc-ii version of the mdx files, and are VERY easy to read/edit/understand. But the only converter available right now, is yubguls, and it basicly uses a 1.00 game.dll where it accesses it''s methods, and converts the file. Both is this pretty buggy, and it does not work for many.

Nub is now making a total convertor that does not need game.dll i hear. But the .mdl format is much easier to understand and most of the importers/exporters work with mdl''s at the moment, thus requiring the user to convert it all the time to/from mdx.

Here is nub''s updated specs:

http://www.wc3campaigns.com/forums/showthread.php?s=&threadid=30383

This is also the "best" .mdx viewer around:

http://www.wc3campaigns.com/forums/showthread.php?s=&threadid=18440

It even supports animations, and it works with war3.mpq and can browse it and shit.

Basicly what the current problem with our exporters/importers are with animating rotations... And that is where the current exporters stand, they can export animated models, but you have to do it correctly, or else you''ll hit the gimbal lock and the .mdx file will go to hell.

Cubasis

Share this post


Link to post
Share on other sites