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 sc2objects.ms 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.
Link to Magos Model Viewer / Editor: http://home.magosx.com/index.php?topic=6.0
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.
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.
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
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
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 facebook.com 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 iz3d.com with the following promo code: 88053102
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 ?
I sometimes get that mesh error as well. No idea what causes it.
keep getting mesh error, and the animations won't load.
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.
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.
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
PM'd you with a mdx that gives me the mesh error when I try to import.
/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.
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.
You're my hero~
All the pieces are falling together really nicely. You're doing a great job. :D
does it works with 3ds max 2011?
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!