Skip to main content

Masks

RustEdit Pro

The nodes in the Masks category of the Terrain Graph's Add Node menu. Round sockets carry maps and square sockets carry single values. See Graph editor.

Cavity​

Picks out dips and bumps by comparing each point with its surroundings.

Inputs

InputKindDefaultNotes
HeightMap
ModeChoiceConcavePick out dips, bumps, or both. Options: Concave, Convex, Both.
RadiusNumber20Metres around each point to compare against. Bigger finds bigger features. Slider from 2 to 200.
DepthNumber2Metres above or below the surroundings that count as a full mask. Slider from 0.1 to 20.

Outputs

OutputKind
OutMap. The result this node produces.

Direction​

How directly each slope faces a light from a chosen direction.

Inputs

InputKindDefaultNotes
HeightMap
AzimuthNumber180Compass direction the light comes from, in degrees. 0 is north, 90 is east, 180 is south. Slider from 0 to 360.
ElevationNumber30How high the light is above the horizon, in degrees. 90 is straight down. Slider from 0 to 90.
WrapNumber0Lets the light wrap around onto slopes facing away, for a softer mask. Slider from 0 to 1.

Outputs

OutputKind
OutMap. The result this node produces.

Distance​

How far each point is from a mask, in metres, outside and inside it.

Inputs

InputKindDefaultNotes
MaskMap
Max DistanceNumber200Metres at which the distance reaches 1. Slider from 1 to 2000.
ThresholdNumber0.5Mask values at or above this count as inside the mask. Slider from 0 to 1.

Outputs

OutputKind
OutsideMap. 0 at the mask's edge, rising to 1 at Max Distance away from it. 0 inside the mask.
InsideMap. 0 at the mask's edge, rising to 1 at Max Distance into it. 0 outside the mask.

Grow / Shrink​

Widen or narrow a mask by some metres, with a soft edge.

Inputs

InputKindDefaultNotes
MaskMap
AmountNumber20Metres to widen the mask by. A negative amount narrows it instead. Slider from -500 to 500.
SoftnessNumber10Metres over which the new edge fades out. Slider from 0 to 200.
ThresholdNumber0.5Mask values at or above this count as inside the mask. Slider from 0 to 1.

Outputs

OutputKind
OutMap. The result this node produces.

Height Select​

Mask a height band with soft edges.

Inputs

InputKindDefaultNotes
InMap, any widthThe value this node works on.
Min HeightNumber0.4The bottom of the height band, from 0 to 1 of the terrain height. Sea level is usually 0.5. Slider from 0 to 1.
Max HeightNumber0.7The top of the height band, from 0 to 1 of the terrain height. Sea level is usually 0.5. Slider from 0 to 1.
FalloffNumber0.1How far below and above the band the mask fades out, in the same 0 to 1 units. 0 gives hard edges. Slider from 0 to 0.5.

Outputs

OutputKind
OutMap, any width. The result this node produces.

Normal​

Which way the ground faces at each point, worked out the way Rust does it.

Inputs

InputKindDefaultNotes
HeightMap

Outputs

OutputKind
XMap. How much the ground faces across the map, -1 to 1.
YMap. How much the ground faces up. 1 on flat ground.
ZMap. How much the ground faces up the map, -1 to 1.

Sea Level​

Land, underwater and shoreline masks around sea level (world height 0).

Inputs

InputKindDefaultNotes
HeightMap
Shore WidthNumber4Metres above and below sea level that count as shore. Slider from 0 to 50.
FalloffNumber2Metres over which each mask fades out. Slider from 0.1 to 50.

Outputs

OutputKind
LandMap. 1 above sea level, 0 below it.
UnderwaterMap. 1 below sea level, 0 above it.
ShoreMap. 1 within Shore Width of the waterline, above or below it.

Slope​

Steepness of the terrain as a 0..1 field.

Inputs

InputKindDefaultNotes
InMap, any widthThe value this node works on.

Outputs

OutputKind
OutMap, any width. The result this node produces.

Slope Select​

Mask a slope band with soft edges.

Inputs

InputKindDefaultNotes
InMap, any widthThe value this node works on.
Min SlopeNumber0.3The gentlest slope in the band, from 0 (flat) to 1 (vertical). 0.5 is 45 degrees. Slider from 0 to 1.
Max SlopeNumber1The steepest slope in the band, from 0 (flat) to 1 (vertical). 0.5 is 45 degrees. Slider from 0 to 1.
FalloffNumber0.1How far outside the slope band the mask fades out, on the same 0 to 1 scale. 0 gives hard edges. Slider from 0 to 0.5.

Outputs

OutputKind
OutMap, any width. The result this node produces.