Maya to Adobe Substance 3D Painter

Here it is. You have to customize a few things but it’s pretty cool (and simple).
Based on this: https://ddankhazi.com/2018/06/02/send-geometry-from-maya-to-painter/
But it’s a little bit smarter.
Again thanks for Victor Kam’s original work (and his free to download plugin).
Go here to check that.

What is this all about

First step: Export object/objects from Maya as FBX

Second step: Create a Substance project for that FBX with a predefined project template (where all is set as you need). For Simple or UDIM method as well.

If this is two clicks than, you are on the right path to be more efficient.


Maya

In Maya, to export the selected objects as FBX use this simple MEL script.
The target folder is your always existing User Temp folder.
You can check the path in the warning message.

{
    string $path = `internalVar -userTmpDir`;
    string $pathList[] = `getFileList -folder $path`;

    if(size($pathList) >= 1)
    {
        string $filename = "exported";
        string $extension = ".fbx";
        string $fullpath = $path + $filename + $extension;

        //FBX Options
        FBXExportTriangulate -v false;
        FBXExportSmoothingGroups -v true;
        FBXExportSmoothMesh -v false;
        FBXExport -f $fullpath -s;
        
        warning ("exported.fbx is Exported to the " + $path + " folder");
    }
    else if(size($pathList) == 0)
    {
        print ("Something went wrong.");
    }
}

Installation and configuration

Download the files here.

First you need a few things in Substance 3D Painter:

  • Two correct export preset for your projects (you can create your own in Painter of course or use my example files: export-presets folder).
    The correct place for those files is: …\Documents\Adobe\Adobe Substance 3D Painter\assets\export-presets
  • Two correctly set and saved Substance project template file (set everything in a dummy project and save as a template from the File menu or you can use my example files: templates folder).
    The correct place for that is something like:
    …\Documents\Adobe\Adobe Substance 3D Painter\assets\templates
    One for the simple and one for the UDIM method (usually you have two different export preset and project template).

Copy the two plugins: maya2painter and maya2painterUDIM folders into the plugins folder:
…\Documents\Adobe\Adobe Substance 3D Painter\plugins

Open the two import.qml file in a text editor and change the template file names to your version (or leave as is if use using my example files).
By default the template names are: DD_PBR_Template.spt and DD_PBR_Template_UDIM.spt
You can replace those at any time, just don’t forget to type in the new names. 🙂

How to use it

  1. Export the geo(s) from Maya
  2. Click the Import Button in Painter (simple or UDIM).

And… that’s it.
If you have any questions, please use the comment section.

Cheers, D

notes:

  • The project template files are not compatible with previous Painter versions.
    I created those with Substance 3D Painter, version 7.2.3.
  • You can’t overwrite a template file while Painter is running
  • You can write your own script in your favorite 3d application to export the fbx file.
    The target folder is something like this : C:\Users\*****\AppData\Local\Temp
    And the file name should be exported.fbx

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.