Creating New Default Input Values for Stingray Nodes

In the ShaderFX editor for your Stingray graph, create a node; for example, Add. Click any input attribute on the node to display its settongs on the Properties panel. A default value has been assigned to the node; in this case, 0 0 0 0 (a float4 value).

You can change this default value to any of the following data types. The attribute port also changes color as its default value is changed to a different data type.

By setting the default value on an input, you can perform operations without providing an external connection.

Example: Changing the input defaults for an Add node:

  1. In a custom Stingray graph, add a Math Add node.
  2. Click the first Value input. The Properties panel shows the initial default, 0 0 0 0.
  3. Change the Default Value string to 1 0 1.

    The Add node now shows the new value, (1.0 0.0 1.0), and the input socket is light blue, indicating the input type is float3.

  4. Click the second Value input. Change the Default Value string to 1 0 –1.
  5. On the Add node, click the Render Swatch icon. The preview swatch now shows a red color, because the node has added two float3 values, (1, 0, 1) + (0, 0, –1) = (1, 0, 0).

    This is one method of setting values without connecting any external input nodes. However, as soon as you connect a node to an input, the default value that you specified is erased and replaced by the new connection.