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 sounds like a great plugin once i get it working i keep getting an error any time i try to import it says: Import failed No ""findItem"" function for Undefined running 3ds max 2012 and the file is a third party sc2 valkyrie have tried with other models same result
update: it only happens to models from a perticular map models from sc2 and this site work fine can't get stuff to export though still great work on getting this far
When I try and export a WoW model (was .wmo converted into .obj) I get this error upon Exporting:
Export failed!
Runtime error: array index must be positive number, got: 0I noticed the .m3 export script doesn't have the feature to export objects individually from each other but instead exports the entire scene. For a personal project I'm working on, this was an issue. I had roughly 300 objects that I needed to export to their own file and not altogether. Therefore I successfully modified the export script to include a "Export objects seperately" feature that will do just that. It names the object what it is named in Max and exports it to the folder specified prior to Exporting. You can also specify the location you wish the object to be at upon exporting. Check out screen: http://img718.imageshack.us/img718/2443/exportmod.jpg
If you'd like the modified script, PM me.
Can't import the models using 3dsmax 2012. I keep getting "Starcraft 2 object type definition file not found" The plugin does not appear in the plugin list.
Same problem with max 2012, unknown system exception on export
Thanks for the tools though cant wait for an update
Heya!
I've imported the Marine model into 3dsmax 2012 and added some attachment points using the " Select and Link " tool - My issue is when I try to export the model - I get the " Export Failed! Unknown System Exception "
I got this message once before - I solved it by deleting all the bones on the model, but seeing that the Marine actually needs animations this solution isn't an option.
Any thoughts?
damn bugs :( is there any chance to create a git or mercurial repository for this script? Just for pull requests and other good things. I wish i could help if i can fix the error.
hmm i tried importing a model (SM_Nova to be specific) and it turned out pitch black, from what ive read its a material problem =/ so far i dont have the same problem with other models but only this 1 particular one, anyone have any idea how i can fix this?
Hi, I was working on exporting a model that I made using 2 models and putting them together. The problem is every time I try to export it it says 'Export failed! -No ""get"" function for #color1start' for some reason. Any other it will work. I found out it was because I was putting 2 models in one, but what is the problem with that? Is there any way to get it to work?
P. S. Thanks for these tools they're GREAT!
For those of you having issues with bad materials, try this:
Make sure first of all that only the sc2 material and the sub material (such as diffuse) are there. I'm using 3ds 9 and it was generating a second composite material.
On top of that make sure that all objects in the map are assigned materials and if they are seperate objects seperate materials. Turns out I had an issue with this as well.
Reguardless, great job on the plugin, you are helping us where blizzard won't.
Compatible for 3D's max 2012? The materials seem to work, the M3 Sections seem to work. However I can not export. Export Failed!
Unkown system exception.Any help on this matter?
By the way, thank you for these tools, they're wonderfull.
For those who wonder why it tells them the error 'Unknown Property Material Type...' - you have not used the SC2 material ! That is, when you import or open your model in 3Ds max, you should run the M3 export plugin right away, as you need it not only to save the file to M3 but also for texture. Having enabled the plugin in Material Editor where you see the spheres you should select from the 'Get Material' the blue spheres list you will see Starcraft 2 among them - the plugin you ran enables it, there now use Starcraft 2 this material and whatever you do with your model you do it from there, having selected Starcraft 2 material.
I however get an error when trying the Import M3 plugin and I use 3ds max 9 SP2, anyone else has problems using the import?
Thanks for the help. When I first started my 3ds max I was like WHAT NO M3 SUPPORT! So I searched around and found your help to be very nice.
this is so great... wish i didn't have a mac so i could use it.
I want to add 2 attachment points to the male colonist model because It has no attachment points in its hands so cant hold weapons. How do i import it into 3ds Max? The .m3 is hidden I think, I don't know when it is because its not in any files. How do I find it? or is there a place to download files like that?
I see that the import script doesn't import cameras, is it a planned feature? I'm saying this because I'm experiencing some problems when importing a starcraft 2 portrait, as when I export it to galaxy, the portrait centers on it's feet. while we're on the subject, the portraits import without any animations, has anyone else experienced this?
Aside from that, the script is great, working with blizzard models is a real treat.
@SkeletalHammer: Go
I am getting the same thing, I have no idea what it's talking about.
How do I make starcraft 2 material?
Btw, I'm trying to export.
@hylonomus5 You need to use the starcraft 2 material for images on the model.
Plz, I really need help for my problem :(Unknown Property Material Type....Standard001....)
Hylonomus, A Prehistoric Lizard