Skip to main content

Brush Graph Inputs and Outputs

RustEdit Pro

This page explains what happens inside a brush graph at each stamp: what the Brush Input node gives your graph, and how Brush Output writes the result into the map. Read it when you build your own brush.

How a stamp works​

At each stamp, the graph runs over a square of ground around the brush, a quarter of the brush's width bigger on each side. Smoothing, erosion and warps near the edge of the brush see the ground around it. Only the ground under the brush changes.

  • The graph works at the map's resolution: one point for each pixel of the height map, and about one for each pixel of the splat, biome and topology maps.
  • Noise, gradients and the other generators are placed by their place on the map, so they line up from one stamp to the next.
  • Each point changes by a weight: Strength × the brush shape × the filters × the Opacity of Brush Output. You do not need to wire the mask or the strength into the graph.

Brush Input​

The map's own terrain under the stamp, without the changes prefabs add on top (see How prefabs change the terrain), and the brush's values.

OutputWhat it gives
MaskThe brush's shape times the filters, from 0 to 1.
HeightThe height, from 0 (the lowest the terrain goes) to 1 (the highest), as Terrain Output takes it.
SplatThe 8 ground textures.
BiomeThe 5 biomes.
TopologyThe topology flags. With a custom topology map picked in the Paint layer list, its flags.
StrengthThe brush's Strength, from 0 to 1.
SizeThe brush's width, in meters.
Direction X, Direction ZWhich way the stroke goes on the map, from -1 to 1. Both are 0 on the first stamp.
Stamp RandomA number from 0 to 1, new for each stamp of a stroke.

Brush Output​

What goes into the map. An input with nothing wired in leaves its map alone.

InputWhat it does
HeightThe ground moves toward this height by the weight: at 1 it takes the height, at 0.5 it goes half way.
SplatIf your graph changes the ground textures it got from Brush Input, the map gets the same change. If your graph makes new textures, for example with Splat Base, they replace the map's textures. Both happen by the weight. Where the map changes, its 8 textures still add up to 1.
BiomeWorks like Splat, for the 5 biomes.
TopologyWhere the weight is over 0.5, each flag your graph set or cleared, compared with the topology it read, is set or cleared in the map.
OpacityHow much of the result goes onto the map, from 0 to 1. With nothing wired in, all of it.
warning

A topology that does not start from Brush Input's Topology counts every flag it does not set as cleared, so the brush removes those flags from the map. To add one flag, wire Brush Input's Topology through a Topology Layer node into Brush Output.

Because topology changes only where the weight is over 0.5, a brush with Strength 0.5 or lower never changes topology.

Nodes​

Every Terrain Graph node works in a brush graph, except the ones that need the whole map at once: Normalize, Flow, Topology Flood Fill and Spline Mask. Brush Output takes the place of Terrain Output. See Nodes. Your custom nodes show in the Add Node menu when every node inside them can be in a brush graph.

Node previews​

Node previews show the graph over a sample stamp: a soft round brush at full strength, where you last painted with the Graph Brush and as wide as that brush. Before you paint, it is 64 meters wide in the middle of the map. Direction X is 1, Direction Z is 0 and Stamp Random is 0.5. As in the Terrain Graph, only nodes that lead to Brush Output run. See Node previews for how to turn them on.