/!\ Compatible Maya 2013 and above. Windows only.
Not compatible with Mac OS and Maya LT.
Hey everybody !
I'm finally able to share my "little" Maya script to all. Subtly named "Substance Maya toolset". As you probably guessed, the script is dedicated to Maya and related to Substance. I'm open to any requests or suggestions, if any.
What is the goal of the script ?
It's a integrated interface inside Maya to call the Substance bakers via our
BatchTools. It handles quick exports and conversions to output all the textures that you want. You can also process multiple meshes at once if needed. You can also use the script to process custom substances (sbsar) over you baked textures to batch multiple meshes.
Where do I get the script ?The script can be downloaded on Substance Share :
https://share.allegorithmic.com/libraries/1647How do I install and use the script ?
A detailed documentation is available on our website over here :
Substance Maya Toolset DocumentationCurrent features :
- Automatic export
- Automatic triangulation of LP during export
- Automatic smooth preview to polygon conversion for Hp during export
- Move and Export from 0,0,0 then put LP/HP back where they were
- Baking multiple meshes in a row (batching)
- Custom mesh nomenclature for batching multiple HP/LP
- One Interface for configuration bakers, export format and export location
- Template system for baking substances in sync with the outputs form the bakers
Planned features :
- Support for name matching when baking
- Support for multiple high-poly
- Cage creation from low-poly
Supported bakers :
- Ambient Occlusion
- Ambient Occlusion from mesh
- Normal from mesh
- Height from mesh
- Curvature
- Materials IDs color
- Vertex colors
- Position
- UVs islands
- World space direction
- World space normal
- Thickness
Changelog :[SubstanceMayaToolset 0.7]
-Added cage creator (with step, triangulation and offset type settings)
-Fixed incorrect dialog box when the tangent space plugin is missing
[SubstanceMayaToolset 0.6.1]
-Fixed : Material IDs baker doesn't need anymore an high-poly mesh if set to low-poly
-Fixed : Incorrect path for cage mesh when sent to the bakers
[SubstanceMayaToolset 0.6]
-Added HP convertion (from smooth preview to polygons) during export
-Added new bakers : Materials Color (from HP or LP), AO from HP, Thickness
-Added warnings if export/batch path is incorrect/doesn't exist
-Added normal Plugin setting (mikkt/unity/custom)
-Added Triangulation during export for LP mesh
-Added global parameters for Rays, Anti-Aliasing and Normal type
-Updated script to support Batch tool 5.0.3
-Updated UI to optimize the overall workflow
-Updated Mesh nomenclature : now saved permanently
-Updated Map suffix : Now saved permanently
-Fixed missing dilation/diffusion setting for some bakers
Replies
I will definitely try it out.
I found out what my issue was. I had the high poly selected when I hit bake and I had assumed the naming structure would handle what mesh was being baked to.
For anyone in the future who runs into this: Select the low poly before hitting bake.
I'm afraid you won't be able to. Our batch tools doesn't work properly on Mac (we have to fix some little things) and my script rely on batch file which are only available on Windows.
Once we will fix the batchtools, I will update the script to support Mac OS.
Is there any specific rules that I have to follow when including a cage? I always get failed on loading the cage. Naming convention matches. I have even tried duplicating the low poly straight up, yet does not work. It's not that big of a deal however as the normal baker gives 95% great results without a cage. It would just be nice to see how much difference it makes.
Now that I try it I am getting the same results. All I did was make a cage from the low poly. Everything else besides what is show in image 2 are at default settings.
Changelog :
My only gripe would be is there a way to save out a copy of the template when you bake out a .sbsar? It would be amazing to then have a permanent editable sbsar with your exported assets maps applied (could edit in Player etc).
My next goal will probably be to support presets files.
I can look into supporting the Templates at the same time. The template system also need the possibility to edit more parameters type (like float/booleans).
I'm currently using 5.0 at the moment so you may have fixed these issues. Nevertheless I'm encountering some problems when using your script.
The first is more of a request than an 'issue'.
Is there any way to define my _hp through a group rather than a mesh? The current issue I'm having is that particular meshes with crease setting are being reset, which means I have to redefine them again (which can be tedious when baking lots of separate geo).
I have flagged the crease issue with Autodesk so this may be an issue that can be resolved on both ends hopefully.
The Baking issue I am currently experiencing is when I view my baked mesh in a 2D package. It seems to have shifted the bake along the X-axis but has no visual effect on the UV's themselves. I'm not sure if anyone else has encountered this too.
I hope these aren't to demanding and I look forward to the next build
I'm not sure what you means by version "5.0", are you talking about the batch tools or my script ?
Can you describe the intended workflow with a group ?
I use this one for example :
I select the LP group, the meshes inside a group don't need to have a proper naming convention as long the group for the HP match. If the crease disappear during the export, is that with the "Convert smooth" setting enabled ?
What software do you use to visualize the textures ? I have seen many apps unable to properly read grayscale texture properly and display them shifted horizontaly about 1/3 their size. I don't have this problem with XnView for example of Photoshop CS6.
Yeah sorry I was referring to the 5.0.0 Batch tool I'm currently using.
I wasn't aware we could group it together (pardon my ignorance), I must have interpreted some text incorrectly.
With regards to the crease disappearing when meshes are merged together. That's actually a bug that Autodesk is now working on for our build at work.
I was trying to preview my normal map in Photoshop CS6 with similar results to what you have described. I Rebooted a couple of times and it seemed to work...
Thanks for getting back to me dude
Whilst the baker works with just singular meshes it doesn't seem to work for me when baking multiple meshes down onto a singular one. I'm often left with the percentage bar stuck at 0%. It'd be better if it crashed and threw out an error report, meaning I could make the change that is causing it to freeze.
Am I doing something wrong with the groups? or can multiple meshes being baked down onto one be implemented?
For example:
Group: Name_hp
Window_hp
Wall_hp
Door_hp
Roof_hp
Group: Name_lp
Plane_lp
Your example shows grouped meshes named correctly but they are singular (which is fine) but I want to do something similar to my above example.
Thanks
If you get a 0% progress bar that means there is probably an error somewhere. I will need to know more about your setup and what Maya says in the log (visible via the script editor).
(If you can send me the Maya scene it would be even better.)
// Error: Line 1.32: Cannot find file "SubstanceMayaToolset.mel" for source statement. // " Im using Maya 2014
and can we get options for non uniform scaling of bakes
I'm running Maya 2016 SP3, I've tried exporting FBX versions 2014,2013,2012 - all giving me the error. Exporting as OBJ works fine.
And I'm on Substance BatchTools 5.2.1 build 16422
seriously, it made my life much easier on the baking part
Sometimes I use substance painter to bake but is not as smooth as baking from maya with this script
Thanks a lot for it =]
- Computing...
- Error: Scene File_Location.fbx couldn't be loaded!
- echo ----------------------
"I have the same problem.
II little trick to fix it (it work in my case):
1. Turn File Dialog to "Maya default" (link)
2. Try To use DAE Format in Substance Maya Toolset (Pure FBX still not working).
- Computing...
- Error: Scene File_Location.fbx couldn't be loaded!
- echo ----------------------
"I have the same problem.
II little trick to fix it (it work in my case):
1. Turn File Dialog to "Maya default" (link)
2. Try To use DAE Format in Substance Maya Toolset (FBX still not wor).
- The path contains some characters that produce errors
- The FBX mesh use a a version too recent for the bakers
- The mesh doesn't exist on the disk
If I choose version through the toolset it doesn't work.
But when I set up it in maya fbx export settinks in works (I use 2013 version of FBX)
- Which version of the batch tools have you installed ?
- Try to attach the bat file generated for the baking (it's deleted by default, use the interface to keep it)