SC2Mapster Forums

Resources > Third Party Tools

M3 Exporter

    #1 Apr 30, 2010 at 20:12 UTC - 1 like

    I've thrown up an M3 exporter plugin for 3ds max in the assets. It's extremely alpha at the moment, which means it's not thoroughly tested and it has very limited functionality, but it is able to export geometry if you follow the correct procedure. I realise I could have made an obj->m3 converter, but I plan to add in animation support which would be impossible with the obj format. For these examples, I've imported models from WoW and Doom3. Any geometry you can make can be exported, however, I'm just using WoW and Doom3 models as an example using 'Add File' in the editor:

    DragonFootSoldier01 Nefarian01 Imp01

    I've released the plugin in its rough state because I don't have much time to work on it and I wanted to provide at least a basic geometry exporting tool for people to mess around with. I'm not going to provide much support for it, and I'll add functionality when I can get around to it. Life is hectic at the moment. I'll do up a tutorial when I get the time to explain how to get the custom textures on the models (they must be added to the MPQ I think, couldn't get it working with the Import function in the editor...) and the whole process. Cheers :)

    Last edited Jun 09, 2010 by Sixen
    #2 Apr 30, 2010 at 20:57 UTC - 0 likes

    Really nice!

    Btw, Blizzard is going to release a tool to do the same thing in the future. No ETA yet though.

    #3 May 01, 2010 at 05:05 UTC - 0 likes

    Damn, I'm waiting for an obj exporter.

    #4 May 03, 2010 at 06:34 UTC - 0 likes

    Really nice job, NiN, :).

    The Chat Gem Lives!

    #5 May 03, 2010 at 09:21 UTC - 0 likes

    Awesome! I might throw some of my ships into sc2 for yucks. We'll see how far I can push polies in sc2.

    I'd love to know how you got the WoW models into 3ds max. Do they have animations in 3ds max as well?

    #6 May 03, 2010 at 14:59 UTC - 0 likes

    Got my model in game, but having trouble getting the material to show up. I'm using DDS texture files and you can see them in the import menu, but I preview my models and i'm unable to see the textures. Do i need to put my textures in a specific file path? Right now the texture is in the same directory as the .m3 that i exported and were in that path when i used the exporter.


    Here's where I'm at right now. Any help is appreciated!

    #7 May 03, 2010 at 16:06 UTC - 0 likes

    Ok, got it. There appears to be a bug in the script that it leaves the last subfolder for your texture import path in the texture name. (I'm using max 2008, not sure if this would happen in 2010). So i renamed the texture to include the last subfolder at the beggining of its name. In this case the last folder was "test" so i added "test" to the beginning of the .DDS filename.


    Here it is in the editor.

    Last edited May 03, 2010 by crazyfingers619
    #8 May 04, 2010 at 02:32 UTC - 0 likes

    @crazyfingers619: Go

    awesome work, makes me want to download max, but I figure It'll take longer to learn max than just to wait for an obj exporter.

    Can you replace units with your model?

    #9 May 04, 2010 at 05:06 UTC - 0 likes

    @zwd: Go

    Yep, in fact i'm able to fly around with the above model. No animations but that's not a big deal since ships don't do much anyway. I'd like to figure out how to rotate it on the y axis to get it to do barrel rolls though :D.

    #10 May 04, 2010 at 07:42 UTC - 0 likes

    @vjeux: Go

    I hope they release their own tool, but from what I read in the latest twitter update, it seems they're holding back and just going to provide more units as part of the campaign component. While the viewer supports importing and exporting M3's, I'm not a firm believer that Blizzard is going to provide support for importing other model formats. They would either have to release a 3ds max plugin, since that is the software they're using, or do something unusual and allow you to import .obj or other formats as .M3's. The latter method is flawed as the majority of modelling formats simply cannot hold the information necessary to generate a complete M3 file.

    I've been considering a metaformat for M3's that is similar to MDL's for Warcraft3 so that the M3 data is expanded into plain text. This would provide an easier way to export data in the various modelling programs so things aren't restricted to 3ds max. However this is alot of overhead to code for and I don't feel confident I could complete it satisfactorily.

    @IskatuMesk: Go

    I have an old M2 importer that I coded from BC-era. It has animation support and a host of other features. I understand WOTLK uses a newer M2 format so the script would need to be updated to support it. I don't see a problem in converting fully animated M2's to M3's.

    @crazyfingers619: Go

    Whoa that's really cool. It's good to see people getting some use out of the script. Like I mentioned it's really rough at the moment but I plan on adding animation support. You would definitely be able to add barrel rolls for movement and such. Thanks for the feedback for the texture problem, I'll be able to fix that up. My question for you, are you able to view the model in the viewer with textures without adding textures to the patch MPQ's (i.e. the patch mpq's located in the latest version folder)? I'm not too familiar with the importer side of the editor, but I could not get the viewer to use textures unless I placed them directly into the patch.MPQ which is very inconvenient. Any help with this will help me debug the models more efficiently.

    #11 May 04, 2010 at 09:08 UTC - 0 likes

    Thanks for the reply!

    I would most appreciate it if you decided to update your import plugin to support the lick king format sometime in the future. That is pretty much the #1 thing on my list to get hammered out - a process of putting WoW models into sc2 (or, really, anywhere; getting them into max is a bridge to most games really).

    Keep up the excellent work.

    #12 May 04, 2010 at 14:03 UTC - 0 likes

    @NiNtoxicated01: Go

    As far as my testing went you could have your textures anywhere (mine were in a folder on the desktop) so long as you put the correct file location on export. The only issue i had was fixing the naming convention of the texture once the model was exported.

    Another issue i had while i'm on the subject was i was unable to get specular maps and normal maps to load in engine, again i'm running Max 2008 so that might be the issue there.

    Lookin' forward to the animation component!

    #13 May 04, 2010 at 21:11 UTC - 0 likes
    Quote from zwd: Go

    @crazyfingers619: Go

    awesome work, makes me want to download max, but I figure It'll take longer to learn max than just to wait for an obj exporter.

    You could import your .obj into 3ds max and export using the exporter.

    • 2D/3D Artist
    • Mapmaker
    #14 May 04, 2010 at 23:06 UTC - 0 likes

    Maybe it has some normal issues?

    But works like a charm.

    I <3 you :P
    No textures on the model, yet, but when I come from uni I'll model an awesome ship and texture it properly to further help you testing this.


    So apparently black parts = no texture.
    The materials must have a bitmap assigned otherwise geometry without a bitmap will turn into black, like in the screenshot. I tried doing a plain solid color and got the geometry all black, made it have a bitmap instead of a solid color and it worked.
    Moar tests:

    Last edited May 05, 2010 by xcorbo


    #15 May 05, 2010 at 06:39 UTC - 0 likes

    @crazyfingers619: Go

    Updated the plugin to add better support for textures. You can now check the 'Use Material Path' and it will use the bitmap paths used in max. You can still customly set the paths if you wish too. The path problems should be all fixed aswell. Test it out and let me know how it goes in max 2008. Specular and normal maps should work...I'll look into it. They're currently being exported to M3's but they may need additional settings to work. I also think the normal maps for M3's use odd settings.

    #16 May 05, 2010 at 18:38 UTC - 0 likes

    @NiNtoxicated01: Go

    Gave it a go, really enjoying the new auto material path functionality, it works.

    Some issues: Although it's reading the spec file, it's not actually applying any of the spec value to the asset. Specularity and HDR spec multiplier are both at 0 regardless of what spec levels you have set in max. An external input for the script would work fine, even better if it accepted your spec value from max (Specular level doesn't have any functionality, instead it's drawing from specular color which makes sense, just took a little getting used to). Same issue with emisives, it's assigning the texture alright but giving it a value of 0, leaving it with no affect.

    Normal Maps: Normal maps are actually working, had issues with the DDS format, but realized most happily that Targas work fine and are easier to manage than DDS files.


    Pic of normals working in engine. (Texture is very preliminary)

    Blend Mode: Currently all textures are set to "Mod", so there's no way to "add" on top of current materials and create more complicated shaders with multiple materials.

    Animated Textures: Not sure if this is possible, but some of the shaders (zerg in particular) pulse in their emisive. Would be great if this animated material functionality could be added as well!

    Hope that helps. Soon as spec has working values the art should really ramp up in this forum ;)

    Last edited May 05, 2010 by crazyfingers619
    #17 May 07, 2010 at 06:17 UTC - 0 likes

    I'm having issues getting mine to export.. =

    MAXScript Rollout Handler Exception

    Unknown property: "name" in undefined

    i have a multimaterial, and each PART of it is named...

    using max 2009 if that helps.

    Last edited May 07, 2010 by Skizot
    #18 May 07, 2010 at 07:15 UTC - 0 likes
    Quote from crazyfingers619: Go

    @NiNtoxicated01: Go Animated Textures: Not sure if this is possible, but some of the shaders (zerg in particular) pulse in their emisive. Would be great if this animated material functionality could be added as well!

    I second this. There's been rumours of billboards having animated textures while experimenting a bit with the exporter and such I managed to get it use .tga, .jpg, .dds, .bmp, .png and .ogv as model's texture, however ogv wasn't animated. If billboard will have animated texture they'll use ogvs for sure. There's videos for adds already in ogv format.

    #19 May 07, 2010 at 10:07 UTC - 0 likes


    got it working with a little help from corbo :D

    • Screenshot040.Jpg
      i get bored easily.
    #20 May 08, 2010 at 03:28 UTC - 0 likes

    here's a question... how do you do team colors?

    my tgas have alpha channels.. so they SHOULD tc correctly, but dont.

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