Skip to content

Instantly share code, notes, and snippets.

@tmorgner
Created May 16, 2019 14:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tmorgner/936de5590e43d2cf3663f125ffa13a49 to your computer and use it in GitHub Desktop.
Save tmorgner/936de5590e43d2cf3663f125ffa13a49 to your computer and use it in GitHub Desktop.
Substance Painter and Designer Helper Files
@echo off
set BASE=%1
REM Packs a Substance Painter splat map into a
REM combined texture image that is usable in a Splatmap shader in Unity.
REM
REM requires ImageMagick to be installed and on the path.
REM
REM https://imagemagick.org/script/download.php
convert %BASE%_Mask_Blending_mask.png -channel A -separate mask1.png
convert %BASE%_Mask2_Blending_mask.png -channel A -separate mask2.png
convert %BASE%_Mask3_Blending_mask.png -channel A -separate mask3.png
convert mask1.png mask2.png mask3.png -combine %BASE%_Mask.png
@echo off
set BASE=%1
REM Packs a Substance Designer texture's Metallic and Roughness map into a
REM combined texture image that is usable in Unity's standard shader.
REM
REM requires ImageMagick to be installed and on the path.
REM
REM https://imagemagick.org/script/download.php
convert %BASE%_metallic.png %BASE%_metallic.png %BASE%_metallic.png %BASE%_roughness.png -channel RGBA -combine %BASE%_metal+roughness.png
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment