Skip to main content

Custom Nodes

RustEdit Pro

A custom node is a group of nodes saved as one node. You place it in any graph like a normal node. When you change a custom node, every graph that uses it gets the change. Use custom nodes to keep big graphs tidy, and to reuse a set of nodes you build often.

Left: a graph with a custom node placed. Right: the same custom node opened, with the sidebar on the left

Make a custom node​

From nodes you already have​

  1. Select the nodes. See Select nodes.
  2. Right-click one of them and pick Create Custom Node. The nodes are replaced by one custom node, called New Custom Node, with a number added if that name is taken. Rename it in the sidebar when you open it.

RustEdit works out the custom node's ports from the wires:

  • Every wire that came into the selection becomes an input. A value that fed several selected nodes becomes one input.
  • Every wire that left the selection becomes an output.
  • The new custom node is wired to the same nodes as before, so the graph gives the same result.

The Terrain Output node is never taken into a custom node. The swap is one undo step. Undo puts the nodes back, but the custom node stays saved in your Custom Nodes folder.

Empty​

  1. Right-click the empty canvas and pick New Custom Node. RustEdit places a custom node and opens it. Inside, the Inputs node has one port called In, wired straight to the Outputs node's port called Out. Both are Any Texture ports.
  2. Build the nodes you need between them.

Edit a custom node​

  1. Double-click a placed custom node, or right-click it and pick Edit Custom Node. The canvas shows the custom node's inside, and the sidebar opens on the left.
  2. Edit the nodes inside like any graph.
  3. Click the back arrow in the sidebar to go back to the graph it is used in. RustEdit saves the custom node on the way out.

Inside a custom node:

  • The Inputs node gives what is wired into the custom node's inputs. The Outputs node takes what the custom node gives out. There is one of each, and you cannot delete or copy them.
  • Every node runs, even if nothing is wired to the outputs yet, so you can see node previews while you build.
  • The preview on the terrain keeps running. Graphs further out use your changes at once.
  • A custom node can hold other custom nodes. Open one inside another, and the back arrow steps out one level at a time.
  • The Terrain Output node is not offered. A custom node is not offered inside itself.

The first time you open a custom node, the view fits all of its nodes. After that, each level keeps where you panned and zoomed.

The sidebar​

PartWhat it does
Back arrowLeaves the custom node and goes back to the graph it is used in. Saves the custom node.
NameThe custom node's name. Use a slash to put it in a folder of the Add Node menu: Math/Remap shows as Remap under Add NodeCustomMath. Two custom nodes cannot have the same name: RustEdit adds a number.
SaveSaves the custom node. A dot on it means there are changes that are not saved yet.
InputsThe ports on the left of the custom node. Click + to add one, then pick its type.
OutputsThe ports on the right of the custom node. Click + to add one, then pick its type.

Each port is one line in the list:

  • Click the line to show the port's settings: Type, and for number inputs Default and Range.
  • Double-click the name to rename the port.
  • Drag the handle on the left to move the port up or down on the node.
  • Point at the line and click the remove button to remove the port. Wires to it are removed too.

Port types​

TypeCarries
Any TextureA map of any width. It takes the width of whatever is wired in.
GreyscaleOne channel: a height map, a mask or a noise.
RGBAFour loose channels.
BiomeThe biome layers.
SplatThe splat layers.
TopologyThe topology flags.
FloatA decimal number.
IntA whole number.
BoolOn or off.

For a Float or Int input, set Default to the value the input starts at when you place the custom node. Set both Min and Max in Range to give the input a slider. Values outside the range are kept inside it. Leave them empty for no range.

Save custom nodes​

  • Click Save in the sidebar, or press Ctrl+S.
  • RustEdit also saves the custom node when you leave it with the back arrow, when you close the Terrain Graph window, and when you rename it.

Every graph that uses the custom node reads the saved version. Placed copies update their ports to match.

When you add, remove, rename or retype a custom node's ports, placed copies of it take the new ports. Their wires and typed-in values stay on the ports that keep their name and type. The undo history of the graphs that use it stays too.

Make Unique​

All the placed copies of a custom node share one file. To change one copy without changing the others:

  1. Right-click the placed custom node and pick Make Unique. RustEdit copies the custom node into a new one called "... Copy" and points this node at the copy. Its wires and typed-in values stay.
  2. Edit the copy.

Where custom nodes are kept​

Each custom node is one .terrainnode file in the Custom Nodes folder. By default, this is the CustomNodes folder next to the RustEdit app. To use another folder, open FileSettings, then Paths, and set Custom Nodes. Then restart RustEdit. See Settings.

Each file is named after its custom node. A slash in the name becomes " - ": the custom node Rust/Rust Height is saved as Rust - Rust Height.terrainnode. When you rename a custom node, RustEdit renames its file too. A file from an older version of RustEdit gets the custom node's name the first time RustEdit reads it.

Share custom nodes​

A graph file does not hold its custom nodes. It only points at them. Each custom node has a hidden ID inside its file, and graphs find it by that ID, not by the file name. So renaming a custom node does not break the graphs that use it. If the custom node is missing, the graph shows a node called Missing Custom Node, and it gives nothing.

To give a custom node to someone:

  1. Find its .terrainnode file in your Custom Nodes folder. It has the custom node's name.
  2. Send them the file. If the custom node holds other custom nodes, send their files too.
  3. They copy the files into their own Custom Nodes folder. RustEdit reads the folder again each time the Add Node menu opens, and before it opens a graph. The new custom nodes show without a restart.

To share a graph, send the .terraingraph file together with the custom nodes it uses.

Delete a custom node​

  1. Right-click a placed custom node and pick Delete Custom Node. Or right-click the empty canvas, pick Delete Custom Node, then pick the custom node from the list.
  2. RustEdit asks first. Click Delete. RustEdit deletes the custom node's file from the Custom Nodes folder.

Placed copies stay in the graphs with their wires, as Missing Custom Node, until you delete them. A custom node that is open for editing cannot be deleted.

danger

Deleting a custom node cannot be undone. Its file is gone from the Custom Nodes folder.

Troubleshooting​

ProblemWhat to do
A custom node gives nothing, and the Notifications panel says it "is nested too deep, or contains itself".Custom nodes can be nested up to 8 deep. Take a custom node out of the chain, or remove the custom node that holds itself.
A graph shows Missing Custom Node.The custom node's file is not in your Custom Nodes folder. Ask for the file and copy it there. See Share custom nodes.