Substance Designer: Automated Workflows

You heard about it yesterday: Substance Designer now allows you to script its behavior using Python 3.6.5. Today, we’ll explore precisely what that means, what the possibilities and limits are, and how it compares to the existing Substance Automation Toolkit.

Substance Designer is a tool favored by highly technical artists. While creators will enjoy flexing their creative muscles with the vast number of nodes, the team also wanted to offer greater freedom to those who want a more personalized interaction with the software.

Before we get into the meat of the API, we feel it’s important to make a distinction: today’s scripting possibilities are limited. Python experts might find them frustrating. But it is a door we are opening into the next life-cycle of the software, and you can expect fairly regular updates that will push back the limits of scripting in Substance Designer.

Substance Automation Toolkit

With the Substance Automation Toolkit, you can automate changes over a large number of assets. Efficiency while working on a large scale is often required when participating in vast projects, and the SAT has proven invaluable for studios.

Substance Designer Scripting API

The scripting API allows you to read and analyze the contents of a graph. You cannot – yet – make changes to a Substance Designer graph with scripting. For now, you will only be able to change node position.

Graph Layout & Node Positioning

You may have noticed a new toolbar in the Substance Designer Summer 2018 release that allows you to align nodes. You can align nodes horizontally, vertically and snap them to the grid. These plugins were developed using the scripting API. Today, you can develop your own plugins. Or if you prefer, you can just take the plugins we made and adapt them to your needs – the Python code is editable. For instance, you can create your own graph layout plugin.

Quality Control

Today, you can use the API to check the quality of your graph – according to your own criteria. Possible applications of this include serious quality control, from a single-user point of view, to the large production team with specific requirements. Once you have determined what you want to see, the API generates a report, letting you have a precise vision of the graph’s quality.

For example, if a production team wants to do any of the following, it’s all possible through the API:

  • Check that any of the nodes is using Absolute Output Size, or some specific Pixel Format that doesn’t match the targeted hardware
  • Check that all the outputs have the correct usages
  • Check that no extra, unneeded, conversion nodes are used in a graph

Custom Graph Exporter

The API will allow you to analyze all the graph types the user can create in Substance Designer:

  • Substance Compositing graph
  • Substance Function graph
  • Substance Fx-Map graph
  • MDL graph

This means that you will be able to analyze the content of any type of graph, and export them to the format you want.

Also, you will be able to compute a Substance Compositing graph to obtain the generated output texture and save the textures where you want.

Plugin Libraries

Today, you can create your own plugin library. Just go to the Preferences panel and add your library directory path in your project settings. This helps harmonize production in a team: one member can easily save a project file and share it with the other team members.

Are you not using Python yet? Well, now is the time to learn!