Circle Image

Pixaflux

Visual Scripting with PixaFlux

Algorithm can be visualized as graphs where the operations are Nodes and the values flow between these nodes through Connections.

For example, the operation:

(6.0 ÷ 3.0) + (2.0 × 4.0)

can be visualized as this graph:

Visual Scripting Math

Where:

PixaFlux

In PixaFlux this operation can be defined with nodes and connections:

Visual Scripting PixaFlux

Node Values

The Connection between two Nodes represents a value that flows from the output of one node to the input of other node.

Visual Scripting Math Sqrt

In the above image:

PixaFlux supports the following types of Node Values:

Common Attributes

A Node in PixaFlux has Inputs, Outputs and Attributes. Inputs and Attributes can both be considered inputs of the operation that the node executes.

PixaFlux includes an Attributes Node that allows artists to create common attributes for the project, and node Attributes can be exposed as Inputs of the node.

This way two or more nodes can be affected by the same attribute in a consistent way:

Visual Scripting Common Attributes

In this project: * The Attributes node defines a FRAME attribute which is returned by the node as the output frame. * The Constant node has the frame attribute exposed as input, and the Attributes node frame is connected to this input. * The Random Noise node has the frame attribute exposed as input, and the Attributes node frame is connected to this input. * The outputs of the Constant and Random Noise nodes are connected as inputs of the Blend node, which composes them over with a low opacity. * Editing the Attributes node frame attribute notifies the Constant and Random Noise nodes, which get the new FRAME from the Attributes node and update their image output. This way both nodes are guaranteed to always generate an image with the same frame, i.e. in the same position and with the same size.

This feature allows Attributes to be reused on the Node Graph and affect multiple nodes.

The Attributes node converts its attributes to Node Values. This is how they are converted:

Attribute Value Types to Node Value Types

You can add to a PixaFlux project as Attributes nodes as you need, but the names of the attributes need to be unique across the project.

To learn more about this feature please follow these tutorials

Reusable Node Graphs

Node Graph projects are algorithms, and one of the main advantages of algorithms is that they can be reused.

PixaFlux projects can be saved to a PXF file and be reused in other projects using the Node Graph node.

Elements of a Reusable Project

The main elements of a Reusable Project are:

Attributes

All attributes defined in Attributes nodes become common attributes of the project. Attributes nodes name private are ignored by the Node Graph node and can be used to define private attributes inside the project.

Inputs

The Inputs of the project can be defined with Input-Output (IO) nodes. PixaFlux looks for IO nodes with output connections and makes them input nodes.

Outputs

The Outputs of the project can be defined with Input-Output (IO) nodes. PixaFlux looks for IO nodes with no output connections and makes them output nodes.

Loop Info

The Loop Iterations node can be used in a reusable project to get the values of the number of iterations and the current iteration.

Visual Scripting Double Border

Loading of Reusable Node Graphs

When the Node Graph node loads a PixaFlux project it executes the following actions:

Visual Scripting Node

Visual Scripting Attributes

Execution of Reusable Node Graphs

When the Node Graph node executes the project, it passes its inputs to the input IO nodes of the project and its attributes to the Attributes nodes of the project. If multiple iterations are executed, the Node Graph node passes the number of iterations and the current iteration to the Loop Iteration nodes of the node graph.

Then the node graph is executed the number of times defined in the Iterations attribute.

If the node graph includes pairs of input-output nodes, the values of the output nodes are copied to the input nodes.

Finally it copies the outputs of the IO nodes in the node graph to the outputs of the Node Graph node.

Main Page