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:

  1. Bake normals, id, ambient occlusion, curvature and world space normals using sbsbaker.
  2. 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.
  3. Cook the specialized substance files to sbsar ready for rendering files using sbscooker.
  4. 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