M3 Exporter

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:

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 :)

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.

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.

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.

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.

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.

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.

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).

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.

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.

EDIT:

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:

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.

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 ;)

@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.