SC2Mapster Forums

Resources > Third Party Tools

Updated MDX Importer for 3ds Max

    #1 Jun 28, 2010 at 10:51 UTC - 0 likes

    I've updated the MDX Import/Export script for 3ds Max originally created by Philip Laing in 2002. Just as I thought, it works really well with the M3 exporter update. I corrected a few serious errors in the script so it should work on all versions of 3ds Max now. Animations now work properly too thanks to borrowed code from the M3 Importer. You can grab the updated script here.

    If you leave the Import as M3 option ticked, it'll automatically scale the model down (to 1/100 if you're curious, Warcraft III models are roughly 100 times larger in size than SC2 models), add attachment objects and update with M3 sequence information aslong as you have the right version of already loaded. You'll find you still have to tweak the model a little, such as removing unneccesary meshes/bones/lights. Additionally, you'll have to apply materials to the model manually. The script doesn't actually grab the material data properly and even if it did, Warcraft III models use .blp textures and have a slightly different material setup to M3's. So the script leaves the material settings up to you.

    I've only updated the importer side of the script, the exporter side may not work at all I have no idea. The main purpose of the script is to convert MDX to M3's with 3ds Max acting as an intermediate. I suppose it could be useful for Warcraft III modders too but I imagine they will use Magos' awesome editor or some other means of importing/exporting MDX's.

    A major thanks to Philip Laing for providing the original open source code for the importer/exporter for me to work with. Without it, this would have been alot of trouble to create myself and I don't know if I'd have done it. I want to thank BlinkBoy (known as BlinkHawk around mapster) from the hive workshop also, as his advice on MDX animation was helpful for getting the rotation animations correct.

    • Illidan.jpg
      Illidan the man!
    #2 Jun 28, 2010 at 15:52 UTC - 0 likes

    Link to Magos Model Viewer / Editor:

    #3 Jun 28, 2010 at 23:12 UTC - 0 likes

    It's taken this long for someone to finally update the mdx importer. Brings a tear to my eye. If I was still modding wc3 I would have baked you a cookie or something in return. Instead, I'll just thank you profusely - this will allow me to bring some of my wc3 format WoW models into max until I get the m2 importer. :)


    Okay, I'm not exactly adept with 3ds max (re: I'm terrible and don't know anything), so hopefully you can give me some guidence here.

    I have here a Protodrake from the Lick Ling beta someone converted over to m2. I'm trying to get him into 3ds max. Well, this importer does exactly that. It imports it into 3ds max. However, I end up with around 8 hundred thousand frames, many of which contain no data at all. Additionally, I am aware that wc3 has some kind of animation blending for transitions, and this seems to have made it into the scene as well.

    I'd like to split apart the animations but I have no sensible idea how to go about that with so many frames. I want to reduce each animation down to around 60-100 frames a piece. Time scaling doesn't seem to alleviate the weird transitions and it's kind of hard to tell where animations start or stop.

    Last edited Jun 29, 2010 by IskatuMesk
    #4 Jun 29, 2010 at 19:00 UTC - 0 likes

    @IskatuMesk: Go

    Import with the M3 option and use the M3 Sequences menu to navigate the animations (it copies the MDX sequence information into the M3 Animation UI). I've noticed the odd interpolations too, I have a solution for that. They need base poses either side of each animation to prevent crazy interpolations in 3ds Max. If I update the script in the future I'll add that in. Hrm, what you're talking about is a FPS issue. Currently the MDX's import at 1000 FPS. I can add a quick update sometime to the script that allows you to change the FPS on import. Otherwise I know of no method to alter animation keyframes based on a new FPS, but if anyone does I'd like to know about it.

    #5 Jun 29, 2010 at 19:54 UTC - 0 likes

    Well, what I tried to do was first bring down the total frame count to about where the last animation data ends (around 200k). Then I timescaled it all the way down to around 2k-3k frames. It works in theory but it's still a big mess to go through with all of the weird transitions.

    I didn't see a sequence menu but I'll have a second look. :)


    There we go, figured it out! Yay! :D

    Last edited Jun 29, 2010 by IskatuMesk
    #6 Jun 29, 2010 at 23:25 UTC - 0 likes

    I tried importing the Archer model and found that some of the animations are rotated incorrectly. Looks like an axis mix-up to me, but I could be wrong. (The animations face directly downward with the feet pointing in the direction that should be forward.)

    Besides that, this is so wicked awesome. =D

    #7 Jun 30, 2010 at 16:48 UTC - 0 likes
    Very nice. I'm really thankful for this. Imagine now how easy it will be to import Warcraft3 into SC2! Awesome!
    #8 Jun 30, 2010 at 18:19 UTC - 0 likes

    Now imagine if we could import Starcraft II into Warcraft III! That would be a bit of a surprise for someone browsing the custom game list.

    If were to somehow be destroyed, 98% of the world would be crying. Copy this into your signature if you're one of the people that would be flying around in your roflcopter making them hear the soi soi sois.

    Game the way we were meant to, and get 20% off of the 22" iz3d monitor at with the following promo code: 88053102

    #9 Jun 30, 2010 at 18:35 UTC - 0 likes
    Well, there is one feature, which is actually missing: Export more than one editable mesh. Personally, for me the feature is not that important, but if you have 2 meshes with 2x Skin Modifier(2 different skeletons too), things will become worse :( . Especially if you think of some models which have a morph model. That would make your export scripts perfect. By the way, it seems there are issues to import animations which change their Z-axis position. But regardingless of this, your export scripts are all awesome and include a lot of work, we all appreciate that :).
    Last edited Jun 30, 2010 by Cyb3rD3lux3
    #10 Jul 01, 2010 at 21:20 UTC - 0 likes

    I tried to import a wow model, that i first converted in mdx, and i get an error "Unknown property: "mesh" in undefined". The model looks fine in 3ds max but hasn't any animation.

    And did you put online the m2 importer you talked about ?

    #11 Jul 02, 2010 at 05:22 UTC - 0 likes

    @Bouda456: Go

    I sometimes get that mesh error as well. No idea what causes it.

    #12 Jul 03, 2010 at 23:14 UTC - 0 likes

    keep getting mesh error, and the animations won't load.

    Last edited Jul 03, 2010 by Metatr0n
    #13 Jul 04, 2010 at 10:09 UTC - 0 likes

    @Cyb3rD3lux3: Go

    The newest version supports multiple meshes/skins. The updated importer infact imports Starcraft II models as multiple meshes with skins now. Check it out here.

    @Bouda456: Go & @IskatuMesk: Go

    If you can send me any max scene files via PM that cause errors with the export script it would make debugging the problem much easier. Otherwise indicate .mdx models that are causing you grief so I can try them and figure out the problem.

    @Metatr0n: Go

    More details would be great. What model is causing the problem?

    Basically, if you send me your problem max scene file if you're comfortable with that I can debug the problem and include a fix in the next update. Either that or indicate the MDX so I can look into it. I'll have a look at the archer model and see if I can figure out what's up there.

    #14 Jul 05, 2010 at 09:33 UTC - 0 likes

    now all I see is the export as MDX option, can i not export it as m3?

    it gave me an m3 file, but when I tried importing in the editor all I got was the sphere of doom

    Last edited Jul 05, 2010 by aGoomba
    #15 Jul 05, 2010 at 16:17 UTC - 0 likes

    @NiNtoxicated01: Go

    PM'd you with a mdx that gives me the mesh error when I try to import.

    #16 Jul 05, 2010 at 19:35 UTC - 0 likes

    /OK wth, I have searched all the internet to find this Exporter/Importer. [seriously, i was searching all this and previous day] I found dozens of nonsence, like .mdx -> .3ds with no f'ing animation and skin.

    Now I hook up with this one. It says "it works with f'ing greater 3ds max versions", will it doesn't for 3ds max 9. Why? Or maybe i'm dumb enough that i don't see where it is located?

    Ok, I run the script [not that dumb enough to not know how to do that] and then happens.. well guess what? ... nothing! ... Ok, I check import in 3ds max - still nothing. Ok I check utility tab - noting regarding mdx importing. Then I started to cry, cus I really want to get this to work!

    so, is it possibe it to work for 3DS MAX 9? / ---

    Nevermind, i figured everything out, it was in MAXScript Utilites lol I really was dumb.

    Last edited Jul 05, 2010 by Pjaay
    #17 Jul 14, 2010 at 17:41 UTC - 0 likes

    I've updated the MDX script. I stopped it crashing on some models and improved the way it does animations in max so you no longer get weird interpolations between animations. This fixes the Archer models animations for instance. Also, I added some very basic conversion code for converting attachments and sequence names into the M3 format.

    The update can be found bundled with the other M3 scripts here.

    #18 Jul 18, 2010 at 00:04 UTC - 0 likes

    @NiNtoxicated01: Go

    You're my hero~

    All the pieces are falling together really nicely. You're doing a great job. :D

    #19 Sep 26, 2010 at 20:34 UTC - 0 likes

    does it works with 3ds max 2011?

    #20 Oct 10, 2010 at 23:20 UTC - 0 likes

    Yes, It does.

    Thank you so much for you work. I've searched for a way to convert *.mdx to *.max for such a long time. ;_;

You must login to post a comment. Don't have an account? Register to get one!