RSS< Twitter< etc

<< Back to FAQ Index

How Do I Organize A Complex Flow?


Once a modifier becomes complex (20+ nodes), finding the way through the logic can become difficult. There are several approaches to organizing the flow to simplify the authoring process:

Collapsing Branches

Double-clicking a node in the flow will collapse the node and hide all nodes connected to its inputs down the flow tree, unless these nodes are also connected to other nodes that are not part of the collapsed branch. This allows for much easier visualization of the separate logical paths of the operator. Note that Output nodes can also be collapsed. In case you have multiple Output nodes, you can always collapse all but one to concentrate only on the part of the flow affecting the uncollapsed Output.

For example, in the Spherify modifier's flow, it is quite difficult to follow the logic with all nodes visible, but double-clicking the node that connects into the last Multiply operator before adding the displacement vector to the vertex Position will reveal only the operators that take the Center of the Bounding Box and the Vertex Position, subtract them, normalize the resulting vector and multiply by the collapsed portion of the tree before adding to the Position to output it as the result of the modifier:

Inputs On The Left

Options located in the View menu let you place most Input node types on the left side of the Editor. This is very useful when the InputValue nodes and other Input nodes have not been exposed to the User Interface yet, but you want to concentrate on tweaking their values, or even finding out which ones to expose in the 3ds Max command panel.

You can use the Inputs On The Left Options > Check All to force all types to be placed on the left, then use SHIFT+Ctrl+[L] to toggle the special display mode on and off.

Collapsing the Output node does NOT hide the inputs if placed on the left, so you can practically ignore the complete flow and just see the relevant inputs. 

Note that the InputBoundBox node is not considered an input to be shown on the left because its type / content cannot be changed, whereas InputChannel operators can be switched to different channels, InputScript nodes can be edited with new scripts and so on.

Encapsulate common functionality in BlackOps

The BlackOps operator (short: BLOP) is a compound operator that can contain any number of operators (including other nested BLOPs) and can define custom input and output sockets. It can be used to combine and collapse a number of operators, usually performing a specific common function, into a single node to simplify the flow. The BLOP can be edited as a sub-flow, and can be saved to disk as a named BLOP that can be inserted as a new custom operator later. BLOPs don't maintain a connection to the copy saved on disk, so you can edit them within the current flow freely without affecting other flows.

In the following example of the same Spherify modifier flow, the selected operators perform the determination of the max. size of the bounding box by comparing its X,Y and Z extents.

By right-clicking and selecting [BlackOp] From Selection, a compound operator will be created, encapsulating that functionality and simplifying the flow somewhat:

Now you can select the BLOP node and change its name, enter notes about what it does and rename the inputs and output sockets to describe what is expected:

You can select the BLOP node and press the Edit BLOP... button in the parameters rollout, or right-click it and select from the context menu to enter edit mode and see the nodes encapuslated inside:

When you are done, you can press the Exit BLOP Editing button to return one level up, in this case to the top level of the flow.

Toggling the Auto-Reorder Feature

The MagmaFlow Editor provides some automatic sorting options which can be turned on and off without losing the user-defined manual placement of the nodes. Simply press Ctrl+[R] to toggle the Auto-Reorder mode on and off. In the View menu, you can select the Reorder Pattern.

Here is the manual ordered flow:

Pressing Ctrl+[R] produces the following in Reorder Pattern > Tail mode. It is called "Tail" because the nodes are ordered from right to left and shifted down so that the output socket is aligned to the input socket it is connected to, if possible:

A similar order pattern, but without the vertical offset is the "Row" mode - the top nodes are aligned to the top of the editor. This is more compact, but harder to "read":

The "Block2" mode finds columns with just one node (first two nodes on the right are Add and Multiply) and combines them in a column of two to save horizontal space:

The other two modes (Block3 and Block4) will not change anything in this case because there are no nodes that could be moved together. 

When in Auto-Reorder mode, adding new nodes will automatically insert them into the flow and move the rest of the nodes as needed, or place the new nodes at the bottom of the editor if unconnected. Moving a node manually will have little effect as the node will soon be moved somewhere else automatically. To copy the automaticly generated positions into the "manual order buffer", press SHIFT+Ctrl+[R]. The Auto-Reorder mode will be turned off and all nodes will be freely movable again.