System Variables



System variables are variables you can use in order to access some specific values. You can use them in functions.

These variables always begin with a Dollar symbol ("$").


ContextNameParticularityType

Purpose

All nodes functions$size-float2

Returns the size of the current node (in pixels).

If used in the "Output Size" parameter (relative to input), returns the size on the previous node.


$sizelog2-float2

As above, but returns the size as power-of-2 values (ex: for 2048*2048 image, $sizelog2 returns 11).

If used in the "Output Size" parameter (relative to input), returns the size on the previous node.


$tiling
integer1

Returns an integer value corresponding to the current node tiling mode (inherited or absolute):

0: No Tiling
1: Horizontal Tiling
2: Vertical Tiling
3: H and V Tiling

 $time-float1

This variable returns the time in seconds since the Substance rendering engine was started.

It is ideal for Substances which need to animate according to time. (E.g. the hands of a clock.)

In some applications, including Substance Player, a Substance that uses $time will cause a timeline to appear in the user interface.

FX-Maps functions$pos-float2Returns the birth position of the pattern. The origin (0, 0) is located at the top left corner of the image.

$depth-float1Returns the octave (level) number of the FX-Map node. This allows a node to modify its behavior according to which level in the quad-tree it represents.

$depthpow2-float1As above, but returns 2 raised to the power of the octave (level) number. This is a helper value that comes in useful for some common calculations.

$numbergenerated by Iterate Nodesfloat1

Returns the number of the drawn pattern. This can be accessed by Dynamic Function graphs controlling an Iterate node to modify its behavior at each iteration step.

Note that $number starts counting from 0, not 1.

When using a chain of Iterate nodes, the $number variable will return the iteration number from the last Iterate node connected before the function parameter it is used. If you want to retrieve the iteration number from multiple Iterate nodes, you should use "custom variables" through "Set" nodes.

Pixel Processor function$pos-float2Returns the position of the pixel being evaluated.