This plugin will export the layer masks for all selected layers in the layer stack. *Substance Painter 2.1 required.

Usage:
1. Add the plugin to the plugin folder.
C:\Users\"username"\Documents\Substance Painter 2

2. In the Export Masks view, set the directory to save the masks using the Export Directory button.

3. In the layer stack, select the layer(s) that contain masks you want to export and click the Export Mask button in the toolbar.

4. In the Mask Export view, you can set the format as well as resolution

Uploaded: over 2 years ago
Updated: over 2 years ago
Version: 1
File Name: export_masks.zip
Size: 3.36 KB

DownloadblackDOWNLOAD



DISCUSS
over 2 years ago

looking great! thank you Wes.
is this in preparation for the layered materials workflow?


over 2 years ago

Thanks! Not in preparation, but will be good use for the plugin : )


over 2 years ago

Hi Wes this is awesome and a great step in the right direction to export masks back into Mari.
However is there a way to get it to work for linux?


over 2 years ago

awesome!


over 2 years ago

This is absolutely awsome and helpful, thank you very much!!


over 2 years ago

But now I'm having a problem with the plugin. When I first tested it, and exported a mask successfully, everything worked fine. But later when I tried to start up SP again it continuously shut down before the main window was even shown. Only when I removed the plugin from the plugin folder, SP2 starts without problems. What is wrong here? I'm so sad, because the export option for masks is desperately needed :-(


over 2 years ago

I forgot to mention, I'm on Substance Painter 2.1.1., on a 64Bit Windows 8.1 machine.
Why did it first work well, starting up without problems and even exportet my test map, but on later trials SP2 suddenly refused to start??


over 2 years ago

I did further testing. I have no problems with the other plugin ('saving incremental files'), this one doesn't disturb my SP2. But as soon as I again add the 'export masks' to the plugin folder, SP2 refuses to start properly, it shuts down during the process of loading, before opening the main window, and later when trying again comes up with the crash report window (which I filled once and sent to Allegorithmic).


over 2 years ago

@bytefactor3d I'm sorry for this issue. I haven't seen this happen before. Can send the crash report to me at wes.mcdermott@allegorithmic.com


over 2 years ago

So we figured this out, thank you very much again to Wes for a quick assistance!!
What you guys need to do is: don't touch the plugin's window, don't undock it, leave it in place docked where it appears first after installation.
An update of Substance Painter (which is scheduled for around the end of this week) should solve the issue, so later it will be possible again to undock and move the plugin window to any other place or monitor.
Thank you and cheers from Charlie ( at Bytefactory3D)


over 2 years ago

Hey there,

I've installed the plugin and the tab appears in the toolbar at the top of the program, but I select a layer with an alpha mask and click on the 'Export Masks' tab, I get this message in the Log window:

[MapExporter] Map export failed (Couldn't open a device on file:///Fill layer 1_mask.png)

Any ideas what's causing this?

Thanks


about 2 years ago

@Paul_S I haven't seen that error before. Can you post in the Painter forums and I can help.


about 2 years ago

Thank you for this wes


about 2 years ago

is there a way to add padding to the mask on export?


about 2 years ago

Thanks everyone : ) Glad the plugin was helpful.


about 2 years ago

@Dinusty I'm sorry but I didn't add the padding options to the plugin. I can add the option in an update.


about 2 years ago

+1 for padding! Is it possible to do now with 2.4.1? Getting some seams in engine due to mips I suspect.


almost 2 years ago

@Dinusty if you want to have the maps exported with infinite padding, for now (until Wes updates it officially) you can open the export.js file in a text editor and change at the bottom section of the code (//export masks) the padding is set to "false" you just need to set to "true", save and close, then re-open Painter.

I hope Wes will add an option for padding size, that's something out of my level of understanding :]


almost 2 years ago

@zurhoch that works for me :) Thanks!


about 2 years ago

@wes That would be great! thanks :)


over 1 year ago

Anybody use it? Not workable now at substance 2.5 and 2.51


over 1 year ago

thank you


over 1 year ago

I second the vote for linux support. Looks like a simple pathing issue maybe (dropping the first '/'):

[MapExporter] Could not save var/tmp/Surface Details_mask.png map
[MapExporter] An error occurred while finalizing the export
[Plugin - export_masks] {
"name": "ExportError",
"message": "An error occurred while exporting map to 'var/tmp/Surface Details_mask.png'"
}
[Plugin - export_masks] Canceled


over 1 year ago

very close to prefect! I just wish there were more options to adjust the naming in the ssame way that the regular export textures button does. Adding Udim tags and such would make this so much more useful!
I will have to manually add them this way, still faster than the alternative I suppose.


over 1 year ago

Im having error with the script too:
[MapExporter] Could not save //b_mask.png map
[MapExporter] An error occurred while finalizing the export
[Plugin - export_masks] {
"name": "ExportError",
"message": "An error occurred while exporting map to '/b_mask.png'"
}

I'm using Substance Painter 2.6.1


over 1 year ago

it would be great if this could export with UDIM and/or texure set in the name! (or have similar options like regular export)


about 1 year ago

Hi does this have padding function?


11 months ago

[Plugin - export_masks] {
"name": "ExportError",
"message": "An error occurred while exporting map to '/Fill layer 2_mask.png'" help me


7 months ago

Hello,how solve this error ?!

[Plugin - export_masks] {
"name": "ExportError",
"message": "An error occurred while exporting map to '/Fill layer 1_mask.png'"
}


3 months ago

This doesn't work anymore with Painter 2018.2.1