Skip to content

Subgraphs

A subgraph packages a group of nodes into a single reusable node.

Select the nodes, open the context menu, and choose Collapse to Subgraph. Connections that crossed the selection boundary become the new node’s input and output ports. The item is offered only when every node in the selection came from the node registry. Expand Subgraph is the reverse, from a subgraph instance’s context menu. Rename is also in the context menu; on an instance it renames the definition, so every instance follows.

Any exposed parameters the collapsed nodes carried come along, as parameters of the subgraph itself. Each instance keeps its own values for them, so two instances of one definition can be tuned separately, and an instance you have not touched renders exactly like the definition. An exposure whose inner node or parameter is later removed inside the subgraph is simply no longer offered.

One definition can be instanced many times. Instances live in a Subgraphs category in the node library, and definitions are saved inside the project archive. To share a node between projects instead, export it as a .surfacenode package; see Sharing nodes.

Double-click (or double-tap) a subgraph node to enter it. A breadcrumb trail appears; use it to exit. Committing the edit refreshes every instance of that definition. Subgraphs nest: a subgraph placed inside another is entered and evaluated the same way, to any depth.

The Global Variables panel follows you in and out, always showing the exposed parameters of the level you are editing rather than the material’s.

Saving, autosaving, and switching material all automatically commit an in-progress subgraph edit first. Autosave ticks are skipped while you are inside a subgraph, because the live graph at that moment is the inner definition, not the material.