- Substance 3D home
- Home
- Command Line Tools
- Command Line overview
- sbsbaker
- sbscooker
- sbsmtools
- sbsmutator
- sbsrender
- sbsupdater
- Command Line overview
- Pysbs - Python API
- Pysbs - Python API overview
- Getting started
- General topics
- Examples
- API Content
- API Content overview
- Substance definitions
- Common interfaces
- compnode
- context projectmgr
- graph
- mdl
- modelgraphindex
- modelannotationnames
- modelgraph
- modelgraphgenerator
- modelgraphimplementation
- modelnodenames
- modeloperand
- modulegraphindex
- moduleannotation
- moduleconnection
- modulegraph
- modulegraphgenerator
- modulegraphimplementation
- modulegraphlibrary
- modulegraphregister
- modulenode
- modulenodeimplementation
- modulenodeinstance
- moduleoperand
- moduleoutputbridging
- moduleparaminput
- params
- projectmgrdoc
- sbsarchive
- sbscommon
- sbspreset
- sbsproject
- substance
- Libraries
- sbsenum
- sbslibrary
- sbsbakerslibrary
- Helpers
- Execution context
- API Change log
- Samples
- Setup and Getting Started
- Integrations
- Substance Maya toolset
- Changelog overview
Texturing Template Demo
Overview
The template demo demonstrates how to apply materials using object specific maps on a set of 3D models.The meshes are created as pairs of high resolution meshes and low resolution meshes where the maps are baked into the UV space of the low resolution meshes using details from the high resolution meshes for high quality normals and AO. The high resolution meshes have materials assigned with colors representing what material should be textured on each part. It uses a python script to drive the command line calls but it doesn't use the PySbs library.
Note, the content for this demo is not included in the indie version of the Substance Automation Toolkit
The data used in the demo are:
- Meshes from the Meshes subdirectory
The python scripts demo_texturing_template.py and batchtools_utilities.py
- The substance file Template\mesh_texturing_template.sbs
- The substances in Template\dependencies directory
The output will be placed in the Template\_output directory
In order to run the demo, make sure python is installed and in your path environment. Then go to the samples directory and run:
python demo_texturing_template.py
It will now invoke a set of calls to different command line tools to generate a set of maps.
Details
The high resolution meshes have colors assigned to them representing material assignments. In the case of the object below yellow represents wood and red metal.
The material assignment is happening through the mesh_texturing_template.sbs material which is built around a multi_material_blend with different colors associated with the different materials and various details on them. The colors in the id map will be used to select what material is used on the different parts of the objects.
The phases the script goes through are:
- Bake normals, id, ambient occlusion, curvature and world space normals using sbsbaker.
- Generate a specialized substance file for each of the meshes based on the mesh_texturing_template.sbs file where the inputs are bound to the mesh specific textures using sbsmutator.
- Cook the specialized substance files to sbsar ready for rendering files using sbscooker.
- Render out mesh specific maps based on the maps.
The generated maps in the output directory looks like this
The final output assigned to the meshes will look like this