M3 Plugins for 3ds Max
Starcraft 2 Model (.M3) Plugins for 3ds Max
Starcraft 2 Model plugins. Tested on 3dsmax 2009, 2010, 2011 and 2012.
3dsmax 2013 is not supported!
The importer and exporter will now be bundled together along with Starcraft 2 object definitions for using custom objects (materials, maps, UI, etc) within 3ds Max. I've chosen to distribute them together so that the object file definitions are in sync with each script.
Starcraft 2 Model (.M3) import plugin for 3ds Max
Currently Imports:
- Geometry
- Bones
- Materials (Standard, Volume, Displace and Terrain)
- Animation
- Attachments
- Particle Emitters
- Cameras
- Lights
- Ribbons
- Tight and Fuzzy hit tests
Starcraft 2 Model (.M3) export plugin for 3ds Max
Currently Exports:
- Geometry
- Materials (Standard, Volume, Displace and Terrain)
- Skin\Bones
- Animations
- Attachments
- Particle Emitters
- Cameras
- Lights
- Ribbons
- Tight and fuzzy hit tests
Setting up an exportable model
Geometry & Materials
- Geometry to be exported must be of the 'Editable_Mesh' type.
- Materials can only be of 'Starcraft 2', 'Standard' or 'Multimaterial' types. Starcraft 2 type is highly recommended.
- Bitmaps must be either 'Starcraft 2 Bitmap' or 'Bitmap' type. Starcraft 2 Bitmap is also highly recommended.
- Decals can now be exported. They are applied through a different UV map channel to the diffuse map.
- In Displace Material, Global strength works as a multiplier of Strength Map. Can be animated. If set to 0, no effect will occur but the higher it goes the more displacement will be visible.
You can now use custom 'Starcraft 2' materials and 'Starcraft 2 Bitmap' bitmaps for extra tweakable settings if you put the sc2_objects.ms script in your plugins directory.
Skin, Bones and Attachments
- Vertices must be weighted via a skin modifer applied to a mesh. This is not required for meshes that have no weighted vertices.
- Attachments are now exported as custom helper objects. They can be found in the Create panel, under the Helpers tab in the 'Starcraft 2 Objects'*s group.
- Unskinned geometry and helper objects that aren't hidden or frozen in the scene will be exported as bones.
Rather important!
Every object needs to have a bone attached to it. To save time on that you have an option in M3 - Export menu called "Add bones". Please, always add bones, script will not do it for you any more. "Add bones" creates and attaches parrent bone at the pivot point of a selected object. If it is helper (Pemitter, Ribbon etc), the helper will be attached to it. If it is mesh, script will create Skin modifier and add newly created bone.
Bindpose Rigging
The bindposes for Starcraft 2 models exists in two forms, the bind pose and the base pose. The first form is the bind pose of the model which uses the absolute positions of the bones and the mesh vertices before any deformation as the 'binding' of bones to mesh pose. The base pose of the model is the 'standard' pose of the model that animations are based off and uses the bind pose as the initial reference. This is the pose the model will assume in the absence of animation information. The base pose and bind pose do not need to be different, they can be the same, this is just the system Starcraft 2 models use to rig bones to model meshes. You can set these poses up at different frames and assign them through the exporter options.
Animations
Animations are now supported by the exporter, however make sure you create beginning and end frame animations for the bones you're going to animate or else you'll be getting weird interpolations. When doing rotation animation, keyframes should be provided every 90 degrees or less of rotation. Animations may not export entirely like you expect because the code is still largely beta.
Cameras
To export Cameras properly you need to create targeted camera. Middle point for DOF functions is deifned by the target position.
Environment ranges define DOF falloff start and end.
Clip planes for the StarCraft to handle are defined by the Clipping Planes values.
Lights
Exported lights must be of "SCII Light' type
Make sure to properly set up the ranges and spot (only in case of a spot light) parameters of the light
Every added light has to be linked to the bone
Ribbons
Ribbons include very similar interface to that of particle system.
It has to have a bone and a material associated with it.
Tight and fuzzy hit tests
Just like any other helper and object, it needs to have a bone attached.
The difference is that it does not take transform information directly from the bone.
Instead, helper's transformation is added into the bone's transformation. The resulting transformation is what you see in game.
Version 2.2 mini-manual:
http://www.sc2mapster.com/forums/resources/third-party-tools/963-m3-exporter/?page=48#p959**
Version 2.1 mini-manual:
http://www.sc2mapster.com/forums/resources/third-party-tools/963-m3-exporter/?page=39#p774
If you have any bug to report please do it it M3 Exporter thread http://www.sc2mapster.com/forums/resources/third-party-tools/963-m3-exporter/
Install instructions
1. Must have 3ds max installed
2a. Extract the scripts (.ms) into your 3ds max '...\Scripts' directory, optionally you can place the scripts in your '...\Scripts\Startup\' directory to have it automatically load them when you launch 3ds Max.
2b. If you want to use Starcraft 2 objects in max (custom materials, maps, animation UI) then place 'sc2_objects.ms' into your 3ds max '...\Plugins' directory.
3. Click on the hammer icon on the default right hand side pane, and click on the MAXScript button. If you didn't have 3ds max automatically load it upon launch, click 'Run Script' from the rollout dialog and locate the script you want to load.
4. Select the utilty (i.e.'M3 - Import', 'M3 - Export') from the Utilities drop down menu.
Special Thanks
Blue Isle Studio (http://blueislestudios.com/): Have graciously supported the development of these tools. Keep your eyes on these guys in the future and check out their website!
Volcore (http://volcore.limbicsoft.com/): For help with vertice flags and initial architecture of the M3 format
Teal (starcraft.incgamers.com): For UV's and his PHP converter source, helped with geometry importing
Witchsong (http://code.google.com/p/libm3/): Providing a great open source library for documenting the M3 file format and designing the M3->Obj converter. Head to http://code.google.com/p/libm3/ for more M3 file spec details. Helped immensely figuring out the details of the M3 file format.
Sixen (http://www.sc2mapster.com/): An awesome website for hosting SC2 development tools and vast XML documentation.
der_ton (http://www.doom3world.org/): Has done some incredible work with the MD5 format. Alot of his work has been adapted for the M3 file format with great success. Big thanks goes out to him!
MrMoonKr: Providing a toUpper function to fix 3ds max incompatibility issues
Skizot: For testing and providing suggestions to improve the script, very big thanks
Phygit: Providing bug fixes and development information to do with the M3 format
ufoZ: One of the original crew to reverse engineer the M2 format and provide a good maxscript importer from which my importer/exporters are based. Huge thanks to his efforts.
Jakub Jeziorski
Florian Köberle (https://github.com/flo/m3addon/) : for creating python scripts, that can convert m3 files to xml and back based on a xml description of the m3 file format.
Hey, awesome tool
But im using "Multi/Sub-object" and then 15 Starcraft II Materials inside it.
However, when I try to export it, its the "3kb" thingy, aka the model isnt there, only the bone.
But when I export it with a simple sc2 material it works.. Any clue why? All my faces have ids
Sorry guys for the recent bug. I didn't know that you were commenting here also (not only in the M3 thread). If you find any bug PLEASE report it in the M3 thread here http://www.sc2mapster.com/forums/resources/third-party-tools/963-m3-exporter/?page=34#posts
I'll do anything I can to take a look at it as soon as it is humanly possible (taking under consideration the premiere of Diablo 3 ;) )
Thanks a bunch :)
please read : http://www.sc2mapster.com/forums/resources/third-party-tools/963-m3-exporter/?page=34
Any one know how to get the Import to work on the 2010 version?
Running into an error with the export in 3d studio max 2011.
-----MAXScript Rollout Handler Exception-----Unknown property: "rotation" in $Target_Camera:CameraPortrait @ [1.425213,-0.517356,0.431623]Here is the code it points to:
Edit: Same with 2010...
Did you upload the right code? This seams more like a WIP dev version...
Thanks!
"the M3_Export_v0.23.ms Script currently has a syntax error that does not allow it to load correctly in line 3471 if (mClass == "sc2material" or) then
The M3_import_v0.32.ms Script does not load
Tested with 3ds Max 2011/2012/2013"
I went in and changed the (mClass == "sc2material" or) to (mClass == "sc2material") like the rest of the lines and it seems to work fine now.
I did have another issue where the import plugin wasn't loading when placed in the startup folder but I was able to start the plugin manually.
Edit: The Import Script for v1.9 will only load in 2010. Fortunatly you can still get a free student copy of it on the website.
You are doing pretty well in use, I found some minor problems: sc2 version present a model file banshee.m3, of which there are three materials, the first is used to model the latter two should be used for animationor particles, the problem is that m3 of your plug-in loaded when not used, the latter two materials, specifically, the second material has a file smoke.dds used to show the animation sequence attack engine issuedsmoke, your plug-in loading model did not use this file, I do not know where the problem, and I want to know how to teamcolor in case of default in opengl rendering, blizzard use glow.dds, and you are using teamcolor the flag in opengl is operating, in order to figure out your 3dmax Decal in the plug-in, I spent two weeks just to confirm that opengl is what action, I also found sc2 map editor, animation sequences and plug-in solution and not the same species in banshee.m3 9 stcactual animation of the sequence, the editor in less than 7, it seems that a combination of which, I hope you have the time to answer my questions, I wish you a happy life
Thank You.
Thank You for doing the essential work Blizzard won't. The fact that sc2 modeling exists at all is because of the guys who contributed to this project.
My debt to you guys is very long. They may be buggy and loaded with issues but they are the only ones out there and you are doing it on your dime.
Thank You.
the M3_Export_v0.23.ms Script currently has a syntax error that does not allow it to load correctly in line 3471 if (mClass == "sc2material" or) then
The M3_import_v0.32.ms Script does not load
Tested with 3ds Max 2011/2012/2013
@DarcZaFire: Go Yeah, I tried it with 2012 too. Too many bugs and I dint get a single model working. And the fact I'm a total noob with dint help either.
@composure19d: Go
I was excited to get 3ds max 2012 free as a student. I was bummed when I found out that this plug in only works for 3ds max 2011. THEN I was bummed when it became to much of a challenge to swap this 2012 version for the 2011.. gave up.
"Starcraft 2 Model plugins designed for 3ds Max 2010. Should work with 3ds Max 6 and above." almost the first line to this thread..
Im using 3d max 2012 and I get an error every time I try to export. Any help?
I have tried multiple versions of the import and export scripts and everytime i get the same error,
Compile error: Bad number or time syntax in line 43DM
If anyone knows what is going on please help... Thank you in advance
I documented what I could of the Physics Bodies and put the particle info from your importer script into the 010 template. Someone posted about having documented the LITE structure on that libm3 page, but their email address was cut off and their profile doesn't exist, so I can't copy his discoveries into the template. Anyway, thought I'd post that some work has been done to your 010 template. :P
P.S. http://www.sc2mapster.com/assets/deps-m3-model-editor/ is actually based on the 010 template.
Edit: I documented the LITE structure, too. Neat, there's a field that determines the light settings required for a light to be used. :)
@alkololl: Go
This isn't a new issue, it's been known for a year +, unfortunately I think the plugin has to be modified... It just sucks that Blizzard hasn't or won't give us more tools to work with. We don't have all the code we need
Since there is no method to edit my previous post, I'm sorry to double-post :/
Actually I found out what problem I have to deal with: the animations are not imported correctly...
Any suggestions to fix this?
hey DarcZaFire, did you have success with the import of m3 files in 3ds max? greets, alkololl :)
It is 2012... I am told that this plug in is not compatable with 3ds max 2012?
hey guyz
i'm rlly interested in importing wow models into 3ds max but i have a huge problem :c when i try to import a m3 model via the script no error messages appear but after finish loading there is only one pyramide in the scene. i first tried it in 3ds max 2010 and it worked well 1 time. after importing a model for the first time it didnt work anymore -.-
here is an picture of my problem after loading: http://imageshack.us/f/600/3dsmax12m3error.png/
big thx alkololl
p.s. sry for my bad english
the ""finditem"" i found has somethinjg to do with the model not having animations but trying to import animations or the animations are broken idk the fix would be uncheck animate objects.