Variables | Substance 3D Designer

Variables are a way of storing values to fetch it later (Get) and/or modify it (Set).

Substance function graph - Get float

What a Get node essentially does, is grab a dynamic Variable, and return it from the Get Nodes' output for use in a function. These Get nodes form the link between the Input Parameters defined in the graph properties and parameter functions.

Every time you use a Get node, you must pick an available value from the dropdown menu. Get nodes will grab a value of the corresponding type. That means you will only see valid options in the menu of a Get node, you can never pick an invalid option. If a variable is not available, it means there's a type mismatch

There are a number of "System" Variables: pre-defined special variables that you can not declare yourself. These are quite important, and for the nodes below it is listed what System variables are available.

When a parameter is exposed, it consists of applying a parameter function on it which only includes a Get node of the correct type.


Get

Get float2 - Icon

These nodes let you fetch the value of a variable which exists in the current scope.

The name of the variable being fetched is set in the Properties dock.

'Get' nodes some limitations you need to be mindful of:

  • They are typed, therefore you need to make sure the variable holds a value of the same type as the node. Type mismatches are reported in the Console.
  • They do not check for the existence of the variable in the current scope. Unfound variables are reported in the Console.
  • In complex functions using control flow nodes such as Sequence, be mindful about the order in which you set and get variables. When Designer detects a case of 'Get before Set', it is reported in the Console.
Built-in variables

Several 'Get' nodes will offer built-in variables to access existing values according to the current context – E.g.: the current pixel position in a Pixel processor, the current tiling mode of a node, ...

All built-in variables are listed in this dedicated page.

Get nodes

Get float - Icon

Get Float

Get float2 - Icon

Get Float2

Get float3 - Icon

Get Float3

Get float4 - Icon

Get Float4

Get integer - Icon

Get Integer

Get integer2 - Icon

Get Integer2

Get integer3 - Icon

Get Integer3

Get integer4 - Icon

Get Integer4

Get boolean - Icon

Get Boolean

Get string - Icon

Get String


Set

Set: Node icon

Text


Is defined

Is defined: Node icon

Text

Adobe, Inc.

Get help faster and easier

New user?