User data
This page describes custom properties (user data) that can be added on Substance graph to execute specific behaviors.
The user data settings are usually applied to input or output nodes of a graph to indicate how the application should interpret them. This allows to request input of a graph to be in a certain way to apply effects is a known context (ex: requesting a specific color space) or to indicate how an output was made in case the application need to apply extra conversions afterward.
- Use data settings are defined as key = value
- Multiple settings are separated by a semicolon ( ; )
Color space
The colorspace setting can be used to request Substance graph inputs with a specific color space or to define an output configured in a certain way. For example specifying the format of the normal map output.
Syntax example: colorspace=$working
Contexts overview:
- Color button: A color button widget in the properties of a Substance graph.
- Graph input/output: input or output node of a graph connected to a channel (ex: BaseColor).
- Image input: generic input of a graph, unrelated to specific channels.
- The table below list first the color space settings compatible prior to version 8.1. The second section is exclusive to version 8.1 and newer.
- Regarding the contexts in which the color space setting can be used, only since version 8.1 can color button define a color space. In previous versions they were assumed to be in display space (sRGB).
Alpha mode
The alpha setting can be used to specify how the alpha of a color input or output (RGBA) is combined.
Syntax example: alpha=premultiplied
Image input default color
The default color of a Substance graph image input is black with its alpha set to 0. The defaultcolor setting allow to define a different value when the image input of a graph is empty
Floating values (range [0, 1]) or integer values (range [0, 255]) can be used to specify the color. Each component value is separated by a comma, while floating point value use a dot as the decimal separator. If a floating has not point it will be considered as an integer.
Syntax example:
- defaultcolor=(1.0,0.5,0.0)
- defaultcolor=(0,128,255)
Image input padding
By default image inputs of a Substance graph don’t have any padding, the area outside the UV island is usually filled with a uniform color for performance reasons. The padding setting can be used to request infinite dilation instead, which can be used for filters to avoid creating seams for example.
Syntax example: p****adding=extend
Disable an output by default
When adding a substance into a slot (like the material slot of the tool of a fill layer), it is possible to specify via the metadata text field to not enable a specific channel :
- On a specific output node (like a material) : disable=(true)
- On a generic output node (like a filter) : disable=(height,diffuse,specular)
When loading the substance, this channel will not be enabled in the user interface and therefore will have no effect in the layer stack. The user can still enabled back the channel.
Designate an output as a common mask/alpha
The output of a Substance graph can be used a shared alpha channel/mask on the other outputs.
There are two ways to do so:
- Create an ouput node with the identifier channels_Alpha
- Or add the following userdata on a specific output node: IsChannelsAlpha=true
Some conditions may apply:
- If an output node with the identifier channels_Alpha exists and other outputs don’t have the userdata, this node will be used as the channels mask.
- If an output has the userdata it will be used as the channels mask as long no channels_Alpha node exists.
- If both a channels_Alpha node and a node with the userdata exist, then the channels_Alpha output node will be used first.
- If multiple nodes have the userdata, the first node found by the application will be used as the channels mask. The order in which the outputs are found is not guaranteed to the same as defined by the Substance graph.
Set default blending mode for Material outputs
It is possible to define what the blending mode of a specific output in a Substance graph should be when drag and dropping materials from the Shelf into the viewport or layer stack.
- On a specific output node: blendingmode=normal
List of supported blending modes:
- normal
- passthrough
- disable
- replace
- multiply
- divide
- inversedivide
- darken
- lighten
- lineardodge
- subtract
- inversesubtract
- difference
- exclusion
- signedaddition
- overlay
- screen
- linearburn
- colorburn
- colordodge
- softlight
- hardlight
- vividlight
- pinlight
- tint
- saturation
- color
- value
- normalcombine
- normaldetail
- normalinversedetail