Python script for combining textures exported from Substance Painter into a single texture. Substance Painter creates a separate set of textures (diffuse, height, normal, etc...) for each material (e.g. body, eyes, clothes). This script will combine all textures of the same type (e.g. all diffuse, all normal etc...) for the same UDIM into a single texture atlas.
- Configure Substance Painter (or your texturing program) to export textures and an idmap.
- Run
python3 main.py
in the root directory of this project.
- Install Python 3.x
- Run
pip3 install -r requirements.txt
to install required dependencies
- Exported ID map uses same naming conventions as other textures, and includes "ID" in name
python3 main.py ./texturesCreatedFromSubstance/*.png ./output
This will spit out a texture for each type of texture (basecolor, normal, etc) in the output
folder.