User data

The user data field in Substance files is a place were can be put any type of information that will be preserved after the cooking. Substance Painter is able to read some specific user data in order to execute specific behaviors. Multiple information are separated by a semicolon (;).

Color space and Alpha type

Substance Input/Output color space is deduced from channel type: Base color, Emissive and Specular are considered as sRGB, Height and Displacement are considered as signed(-1..1), other channels are considered as Linear/Pass-through.
Substance Input/Output alpha component (RGBA) and the opacity channel is considered as Straight (not Premultiplied) by default. In order to override the default color space and/or alpha type, set the Input and Ouput "User Data" fields with specific keys. 

The field is parsed as a list of pair key=value separated by semicolons. 
The keys recognized by Substance Painter are :

  • ColorSpace: I/O color space. Possible values are:
    • sRGB
    • Linear
    • Passthru (equivalent to Linear)
    • SNorm (-1...1)
    • NormalXYZLeft (DirectX Normal map)
    • NormalXYZRight (OpenGL Normal map)
  • Alpha: I/O alpha or opacity channel interpretation. Possible values are:
    • Straight (default)
    • Premultiplied
    • None (passthrough)

The Alpha key must be always set on main channel, not on corresponding channel opacity if any.

Example :

Input default color

The default color of an image input is black with its alpha set to 0. You can however override this default color. Use the parameter "defaultcolor" for that purpose. You can either use value between 0.0 and 1.0 or 0 and 255. If Substance Painter detects no '.' (point) in the number we consider that the number is an int instead of a float. 

Example :

Input padded

By default the input of a substance will receive a texture with an uniform color filled outside of the UVs for performance reasons. However it is possible to request Substance Painter to provide an input that has padding/dilation instead outside the UV islands. This is very useful for example for filters such as Sharpen or Blur.

Example :

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

The output of a Substance graph can be used an alpha channel/mask on the other outputs. To do so, add the following userdata on a specific output node: IsChannelsAlpha=true. This settings only applies to Substance graph used in material mode.

Note that some conditions may apply:

  • If a "channels_Alpha" node exist and an other output don't have the userdata, this node will be used as the channels mask.
  • If a "channels_Alpha" node doesn't exist and an output has the userdata it will be used as the channels mask.
  • If both a "channels_Alpha" 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 one found by Substance Painter 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.