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.
Ok, managed to make it work.. kinda... It still shows errors when doing the check but the export was successful. Now the problem is that in SC2 it is pure white so I think somehow the material didn't applied or something ? The other thing is it seems kinda big , 300KB . Is there a way to compress it or something ?
I will attach a photo of the item how it is viewed in 3D Max , SC2 Import and Cutscene http://postimage.org/image/pew52yr6b/full/
Hey,
So I just installed 3D MAX 2011 and made a new file. It still says it cannot find the material. Am I missing something ? And if I try to export like this, it gives an error and doesn't work. The good thing is that the bone problem is fixed .
Here is the link the the photo showing the problem. Problem
@gorjdesign: Go
Did you try to just export the model? I know about that material check bug, if you're certain that the proper material is there then just move along. What about that bone?
Also, I really recommend switching to max2011. It was the development platform and I can't guarantee that it will work the same in max2012.
I really need some help. I tried 3d Max 2010, now I am using 2012. I installed the script to the specific folder and it loads in 3d Max. I imported a model from starcraft, also copied the 2 textures it requires to the maps folder and everything seems alright. Now I try to export it and I use the scene check but it gives me the following errors: - It doesn't have the material applied , which is weird because I didn't even change it, and I can see it is there, in the material panel it shows it is green - starcraft and bla bla... maybe I am missing something ? - And the second error is adding the bone. It says it doesn't have parent bones...bla bla bla. I did add the bone but it doesn't add right, it adds a huge crap of graphic. This worked in 2010 so I don't know what is going on now...
So.. if anyone could help ...
hi, im trying to changing one specific Nova's animation ( Stand Ready )
i have edited keyframes in 3ds max 2011 but after exported to SC2, the animation reverts back to normal ( its like no changes have been made )
can anyone help me with this ?
Thanks leruster, i got the M3 files for Hots but as you said the animations are not imported because the M3 format seems to have new values for the animations and textures. Getting the new units of Hots in a video IRL would be great, i will stay around and check if things evolve :)
I'm currently trying to delete some meshes from animated models (TechLab, TechLabDeath, ReactorDeath, TechReactorDeath) and I get this error on exporting:
Unknown property: "name" in [184, 198, 207, 171]
Importing the model ArtifactContainmentField doesn't load the textures;
http://i.imgur.com/s2GHm.png
When I then try to delete some objects (http://i.imgur.com/tm2iF.png), export it and re-import it, I get this:
http://i.imgur.com/ulART.png
Hi, thanks for your works. it's really helpful. I wonder to know that could your script export the .m3a file? I already have some models with some animations and now I want to add some more with independent files without modification of the origin models.
@Zebarcode: Go
Everyone can download beta client and have an access to the HoTS content. Yet, the HoTS .m3 format has somehow changed so even if you'd have the .m3 files you wouldn't be able to extract much besides model and textures.
I am looking for Heart of the Swarm M3 files for SC2 "in real life" videos like this one: http:youtu.be/wdNUrFZGJpc
I am a video maker and i don't have acces to the HOTS files, if you agree in sending me the M3 files: please contact me: [email protected]
Am I supposed to name animations using key notes in track notes? When I try to export with animation, an error is displayed: "Type error: Call needs function or class, got: undefined" and the debugger highlights the script line that says: anim.name = sc2_Get_ssData_animss ".name:" type:#string
I also get an error when I try to import models with "Animate Objects" checked.
I'm using 3DS Max 9 and the plugins work great for static models, just having troubles related to animations.
Hi, I'm running 3ds Max 2010 x64 with the 0.34 Import script. When trying to import the new SC2 Heart of The Swarm Beta M3 files, I get errors unless I turn off "Import Materials" and "Animate Objects". With all settings on it crashes the application.
Error messages I get: Import Failed, Unknown property: "count" in undefined
With "Animate Objects" turned off I get: Import failed, Unknown property: "matInd" in undefined
Thanks, just to let you guys know.
@TassadarCW: Go The latest version of plugins should work with 9.
I know we are all meant to upgrade to 2011/2012 etc.. but what is the latest version of m3-plugins which was still atleast notionally found to be semi-normal with Max 9? I am looking for some very basic WofWm2+TeamAlpha -> SC2 conversion facilities which will work with 9. I know people used 9 in the past - is this now forgotten knowledge? :)
My distaste for 2008+ stems from the ever-growing list of server processes it insists on installing.
@Rispetto: Go
The workaround doesn't exists. Instead, there is a proper way to prepare the model. First, it needs to be Editable Mesh. Second, it needs to be skinned. Third, it has to have StarCraftII material on it.
Also, import random model from sc to do the scale check.
And besides, you really want to import that heavy model? :)
But I agree on the documentation part, I shall make some.
The exporter works fine, but there is little to no detail on how to properly use the plugin.
When I import the models into SC2 they do not appear (or appear as spheres). To my knowledge there is no workaround.
@composure19d: Go
Explain a bit more please
Would be really nice if you could release an update that retains .mdx animations when converted to .m3. Real pain in the ass.
Hey I am having trouble importing my 3ds max model into SC2 map editor, I have followed all of the directions listed in the read me, also just downloaded the 2.1 version. When I go to import my model into the editor the images doesn't appear. I'm not sure what to do, and not sure if having 3ds max 2013 is the problem.
Arnh I don't know if Multi/Sub-object is supported ;) But in max you don't have to use Multi/Sub to apply different materials onto different polys of the Ediatable Mesh object. Just select the polygon on apply the material.
That said it may not work. Try splitting the mesh into separate entities, one model per material.