bwTools - Documentation

General / 24 March 2020


Hi all!

Today is the first release of a group of plugins I have been working on to help organize and layout our substance designer graph networks. In conjunction with this, comes the release of bwTools, a Substance Designer plugin consisting of the tools I have been working on and will provide a platform for me to share any future work. As a bonus, my previous optimize graph plugin is bundled with it. This post will serve as documentation for that, so for an overview see links below.

You can find an overview video here:

https://www.youtube.com/watch?v=4Ckh0mgwYcA 

store page:

https://www.artstation.com/benwilson/store/ewNd/bwtools-substance-designer-plugin 

Please contact me for support through artstation or email!


================================================

Installation

Open Substance Designer and navigate to Tools > Plugin Manager...

Click Install at the bottom

 Navigate to your bwTools.sdplugin file and click open


================================================

================================================

bwTools

bwTools consists of 2 parts. A toolbar at the top of the Substance Designer application and the various plugins which make up the tools.

All settings for individual plugins currently installed can be found in the settings window here.


================================================

================================================

Layout Graph

This tool is designed to help speed up the laborious task of neatly arranging your nodes. Is it best used as a helper tool when laying out your graph to your personal style and to make the most of it, we must understand how it wants to layout your node selection.

Node placement behavior

Nodes are always placed behind their outputs and always inline with the one which produces the longest straight line.

Nodes have a concept of height, which means they will correctly stack on each other.

However, be aware that due to a limitation with the Substance Designer API, the plugin assumes all inputs/outputs are visible. In the example below, the top two nodes have many hidden inputs/outputs, leaving artificial gaps.


Nodes which start a chain are called root nodes. These are left untouched and all nodes input into it will arrange accordingly. Therefore, it is important to provide enough space for the network to expand if there are multiple root nodes.


The Mainline Concept

The tool wants to find a mainline through your selection and provide space for other parts of the network to feed into it. It typically assumes the network with the longest chain is the mainline.

If it thinks your network is equally important, it will simply place them evenly.

This makes it possible to influence the layout based on  your selection.

Other nodes are inserted into the mainline relative to their input position.

The tool will generally favor the middle node chain if possible however.


The Network Cluster Concept

Group of related nodes will form network clusters and these are what feed into the mainline. They will also be given space and positioned such that they never overlap with the mainline. The darker frames below are network clusters.


Looping Networks

Nodes that loop back into the network at various points form looping networks. These are often very complicated and can sometimes stretch the entire length of the graph. 


While the tool will successfully handle these types of networks, it is often better layout your graph more contextually, using the tool as an aid to speed up the process. Taking the network above, we run the tool on smaller network clusters instead (shown in the darker frames) and position them more contextually and to fit your personal style.


Settings

Hotkey

You can define your hotkey here. Requires a Substance Designer restart

Node Width 

Sets the width of each node, generally you can leave this untouched.

Spacer

Sets the distance between each node

Selection Count Warning

The plugin processing time is exponential, meaning large selections can take a very long time to compute. A warning is displayed before running the plugin if the number of selected nodes surpasses this threshold.

Consider Splits Nodes For Mainline

There are two styles for laying out the network. If Consider Split Nodes For Mainline is on, the algorithm will reason on split nodes first, generally preferring to use them as mainlines. This results visually larger encasing loops.

If Consider Split Nodes For Mainline is off, split nodes are given the same priority as everything else. The visual result here are more defined node clusters and grouping. Unless there are a lot of complicated looping networks in your selection, there may be no difference between the settings.


================================================

================================================

Straighten Connection

This tool will create dot nodes out of a given node to each of its connected outputs. Which helps reduce visual clutter and readability.

Dot nodes will be chained together.

Works on multiple selection too, handy to clean up the entire graph at the end of a working session.

There is a tool to remove dot nodes connected to your selected node too. Found in the toolbar

Settings

Straighten Selected Hotkey

You can define your hotkey here. Requires a Substance Designer restart

Remove Connected Dot Nodes Hotkey

You can define your hotkey here. Requires a Substance Designer restart

Distance From Input

Defines how far from the input of each node to place the dot node


================================================

================================================

Optimize Graph

This tool can be used to optimize various parts of your graph.

Remove Duplicate

Composite Nodes - Evaluate Input Chain

If this is on, the plugin will identify chains of nodes which are identical and remove them too

The plugin has some rules to what it regards a duplicate.

Settings must be identical for a node to be considered a duplicate

A node with an exposed parameter is not considered a duplicate

Uniform Color Nodes - Output Size

Will reduce all selected color nodes to 16x16, the optimal output size for a node in designer. Connected outputs are automatically set to relevant to parent


Blend Nodes - Ignore Alpha

Any selected blend node which only have grayscale inputs will have its alpha blending mode set to ignore alpha. 

Note: This setting requires a recompute of the graph, so is disabled by default.