Subgraphs

Wrap a tangle of nodes into a single tidy node you can dive into, reuse, and share.

As a graph grows, a handful of nodes that do "one thing" start to crowd everything else. A subgraph lets you fold that selection into a single node on the canvas. The work still happens exactly as before, but the parent graph stays clean — and you get a reusable building block you can drop in again and again.

Collapsing a selection

Select the nodes you want to group, then press Cmd-G (Ctrl-G). They collapse into one subgraph node, and DNA automatically wires it up:

So the new node slots straight into the surrounding graph with nothing left dangling. Give it a name that describes what it does ("Glow", "Crowd Setup", "Audio-reactive Tint") and the canvas instantly reads more clearly.

Group early and often. A subgraph called "Background" is far easier to scan past than fifteen raw nodes — and you can always dive back in.

Diving in and back out

A subgraph isn't a black box. Double-click it to dive inside and see the nodes you collapsed, now living on their own canvas. Edit them freely, then step back out to the parent graph.

Inside, two small terminal nodes mark the edges of the subgraph:

Only what you connect to an Out node leaves the subgraph, so these terminals are how you decide exactly what the node exposes. Add more pins to either to surface more inputs or outputs.

You can nest subgraphs inside subgraphs, up to a generous depth limit. That's plenty for organising even very large projects, but it does mean a subgraph can't contain itself.

Edit in a window

Diving in swaps your whole canvas for the inner graph. Sometimes you'd rather keep the parent graph in view while you tweak the inside — for that, open the subgraph in its own Edit-in-Window floating editor. The inner nodes appear in a separate window you can move and resize, with the main graph still visible behind it. Handy when the subgraph reacts to upstream changes you want to watch live.

Surfacing controls to the outside

Often there's one knob inside a subgraph you want at your fingertips without diving in every time — a radius, a colour, a speed. You can surface that control so it appears as an editable widget right on the subgraph node's face.

A surfaced control inherits everything from the inner parameter it drives — its widget, its default, its range — so it looks and behaves exactly like a native control. Turn a glow subgraph's blur amount into a surfaced slider and you can dial it from the outside while the wiring stays hidden.

Surfaced controls are the difference between a tidy cluster and a genuine reusable tool. Expose the two or three settings that matter and hide the rest.

Saving a subgraph for reuse

Once a subgraph earns its keep, save it to your asset library so you can reuse it across projects. Saved subgraphs become .dna subgraph assets that show up in the Asset Browser alongside your images, videos, and other assets.

From the Asset Browser you can:

Each copy you place is its own instance — change one without disturbing the others. A subgraph can also be embedded straight in the project file, so a .dna you hand to someone else carries its custom subgraphs with it and opens correctly on their machine.

A subgraph can run its own timeline. If it contains an independent timeline, the inside can play at a different frame range or speed than the parent — useful for self-contained loops you reuse at different tempos.

See also