warcraft model importer

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Post by dlangdev »

qqta:

If you can find a spec sheet of the mdx file format, I'll start working on a loader for it. I promise I will write one up for Irrlicht if there's non yet.

Unfortunately, I couldn't find a good spec, I started here http://en.wikipedia.org/wiki/MDX_(file_format) and it lead me to nowhere.

However, I found the spec for the MS3D ( http://local.wasp.uwa.edu.au/~pbourke/d ... ms3dspec.h ) format. I'll write a test parser for that too, but later.

I already got the B3D reader/parser going ( see http://irrlicht.sourceforge.net/phpBB2/ ... highlight= ) , and will move on to write the test parse tree for that.
Image
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

ms3d and b3d are already supported by irrlicht :|
Image Image Image
TheGameMaker
Posts: 275
Joined: Fri May 12, 2006 6:37 pm
Location: Germany

Post by TheGameMaker »

dammit I knew a site that got the specs..
(you should have a look into the tools section of the big WC3 modding sites.. there are different converters.. and on one of the builders HP there were the specs for MDX/MDL) - gonna have a look
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Post by dlangdev »

Be sure to include a URL source for a sample mdx file, a test file for testing the parser code.
Image
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Post by dlangdev »

JP wrote:ms3d and b3d are already supported by irrlicht :|
I know, I wrote that code for studying B3D. And also provide non-Irrlicht projects a tool for loading B3D meshes as well.
Image
TheGameMaker
Posts: 275
Joined: Fri May 12, 2006 6:37 pm
Location: Germany

Post by TheGameMaker »

dammit I think it was the following page :
magos.thejefffiles.com
http://www.wc3campaigns.net/tools/specs/index.html
is quite good.. looking for MDX i found the following two working sites + magos(down):
http://kmkdesign.8m.com/downloads/
http://www.wc3campaigns.net/tools/specs ... Format.txt
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Post by dlangdev »

Cool.

U da man, bro!
Image
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Take this one as an initial starter:
http://parsys.informatik.uni-oldenburg. ... Loader.zip
It contains the MDX loader for static meshes and the blp loader for uncompressed images. You just have to add it to scene manager and nulldriver, and define the necessary symbols in IrrCompileConfig.h (I left that part out for brevity).
The loaders works for static meshes only (for now), and does not support many material properties. I'll commit this stuff if someone volunteers to add some more stuff to it (I'm busy with other things, and I also don't want such a partial loader in a release version of Irrlicht).
qqta
Posts: 15
Joined: Tue Mar 04, 2008 11:05 am

Post by qqta »

JP:
i'm trying to find other models in turbosquid but what i need is some monster or creep models (about 20 of them) and i can only find chairs, tables, and stuff..

JP, bitplane:
i already used milkshape 3d but when i tried to export my .mdx model into .md2, it says "Found vertices with no bone! No animations are exported!"
when i export it to .b3d it works, but the animation's gone..
so i just save it to .ms3d but the animation's gone too..
i'm a bit confused here.. (sorry.. told u i'm stupid about this thing :( )

dlangdev:
i can use b3d if i have a good converter between mdx and b3d (milkshape is not working)

hybrid:
i will try to use it.. i'll tell u the result asap..


everyone:
thank u so much for helping me..
no-one knows other converter???

i put one of the models here if u're curious enough to try it..
it's a panda (not a cute one)..
i include
- the original mdx (from warcraft mpq extraction)
- the md3 from it (i used mdxtomd3converter)
- the texture (.bmp)
- the md2 from the md3 (i used misfit model 3d and it has no animation)
http://www.esnips.com/doc/02ab21bf-f834 ... 74a7/panda
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Hmm, looks like milkshape cannot export frame based animations. Try .x, as this format supports als keyframe animations.
Seems like the mdx loader interprets some parts wrongly, the faces seem to be inside out.
qqta
Posts: 15
Joined: Tue Mar 04, 2008 11:05 am

Post by qqta »

hybrid wrote:Hmm, looks like milkshape cannot export frame based animations. Try .x, as this format supports als keyframe animations.
Seems like the mdx loader interprets some parts wrongly, the faces seem to be inside out.
i tried the .x but the animation didn't work.. i dunno.. is it something with the mdx?? what do u mean by the faces seem to be inside out?
TheGameMaker
Posts: 275
Joined: Fri May 12, 2006 6:37 pm
Location: Germany

Post by TheGameMaker »

mdx got a f***ing strange way of using bones.. you have to split the mesh into single segments.. each segment will be acting like a bone itself.. so no bending nside a segment.. now there is a initial pose in which all the segments do fit together.. Warcraft uses this pose to identify which vertex have to be welted together -_- took me weeks to understand that poop(out of the artists way of thinking...)
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Post by dlangdev »

qqta: That's what I'm planning to do, tackle this inter-format exchange head-on. I'm currently reading the mdx spec and will start writing a sample reader/writer while studying hybrid's posted code along with it.

I'm still looking into the ANIM chunk export/import. It would be nice to have a common parse tree for them sometime later, so that animation can be converted to any format. Although this part is going to be a bit tough for cases where BONE is not present. B3D has BONE, KEYS and ANIM for animation, maybe MDX has the same elements or the equivalent of it.
Image
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Yes, mdx has the same elements. Sequences are animations, bones are bones, and keys are lots of K??? elements. The thing is that application of those elements might differ among the mesh types.
Post Reply