Table of Contents

Flow Node

  • Category: Nature
  • Edition: All editions
  • Output type: Masks and a flow map
  • Typical place in a graph: after the final height, feeding texturing and water or lava placement

Flow simulates liquid running over the terrain, from rain and spring water to mud, tar and lava. Liquid comes from a Source mask, or falls everywhere like rain, follows the slopes downhill, gathers into streams and pools, and spreads into lobes when it is thick. The terrain itself does not change. What you get is a set of masks of where the liquid went: streams, pools, wet ground, and a flow map for animating water or lava in a shader.

Rain over eroded mountains: the drainage network shown in red

When to use it

  • Find where streams and rivers run on your terrain, to texture riverbeds, place water or grow vegetation along banks.
  • Lava flows from a volcano, with their thickness for texturing (recipe volcano-lava-flow).
  • Mud flows, tar seeps and wet ground around springs.
  • A flow map to scroll a water or lava texture along the flow in a shader.
  • Not for: carving channels into the terrain (use Hydraulic Erosion 2; Flow does not change the height); snow (use Snow Fall 2).

Inputs

Slot Type Required What to connect
Height Mask Yes The surface the liquid runs over, usually the final eroded height. It is only read; the terrain does not change.
Source Mask No Where the liquid comes from, such as a vent, a spring or a crater rim. White is the full Source Rate. With nothing connected, it falls over the whole map like rain.

Outputs

Slot Type What it holds
Flow Mask How much liquid ran through each place over the run, from Flow Min (black) to Flow Max (white) on a log scale. Streams and channels are bright; thin sheets are dim.
Depth Mask Liquid resting at the end of the run, up to Depth Ramp: pools, lakes and lava thickness.
Reach Mask Everywhere the liquid has been during the run, up to Reach Ramp, even if it later moved on: wet or scorched ground. With a constant source it looks almost the same as Depth; it differs when Source Over Time fades out and liquid drains away.
Direction Color A flow map: red is the flow along X, green along Z, and 0.5 means no flow. It fades to neutral where the flow is below Flow Min. For scrolling a water or lava texture in a shader.

Properties

Apply Preset

Apply Preset... sets a tested starting point. Rain is meant to run without a Source; the others expect one.

Preset Liquid Source Rate / Iteration Viscosity Yield Strength Flow Min / Max
Rain (the defaults) Rain over the whole map 5 / 300 0 0 20 / 400
Spring Water Water from a source 100 / 300 0 0 0.4 / 40
Mud Thick mud with lobes 100 / 400 20 3 0.4 / 40
Tar Slow, viscous tar 100 / 400 40 0 0.4 / 40
Runny Lava Lava that runs far in streams 200 / 400 60 5 0.4 / 40
Thick Lava Lava that piles up and stops short 200 / 400 200 30 0.4 / 40

General

Property Default Range What it does
Iteration 300 1 and up Length of the run, in simulation steps. Viscous liquids move slowly and need more steps to run out.
Iteration Per Frame with Auto Auto on 1 and up Steps per editor frame. Leave Auto on.
Feature Size 8 1 and up, meters Size of the smallest flow feature: the simulation runs on a grid of this many meters per cell, then the result is fitted to the output resolution. Larger is faster and runs further for the same number of steps; smaller makes finer channels.

Liquid

Property Default Range What it does
Source Rate 5 0 and up, millimeters per step Liquid added each step where Source is white, or everywhere without a Source.
Source Over Time Constant at 1 Curve from 0 to 1 Source strength over the run. Fade it to 0 near the end to let the liquid settle and drain.
Evaporation Rate 4 0 and up, millimeters per step Liquid removed from every wet place each step. Thin sheets dry out first, so only the channels survive.
Viscosity 0 0 and up, centimeters How thick the liquid is: the depth at which it moves at half speed. Shallow liquid crawls, which forms steep fronts and lobes. 0 is water.
Yield Strength 0 0 and up, centimeters How much the liquid resists moving at all. It only flows where depth times slope is above this value, so it comes to rest thicker on gentle ground. 0 never stops flowing.
Inertia 0.6 0 to 0.95 How much momentum the liquid keeps. Higher runs wider around bends and can climb small bumps.
Channeling 2 0 to 8 How strongly the liquid favors the steepest way down. 0 spreads into wide sheets; higher forms thin channels.
Roughness 30 0 and up, centimeters A noise added to the surface the liquid sees, to break up flows on smooth terrain. It does not change the terrain.

Output

Property Default Range What it does
Flow Min, Flow Max 20, 400 Flow The range mapped from black to white in Flow, on a log scale. Flow is measured in meters of source drained per meter of channel width. Raise Flow Min to keep only the channels; lower both when using a small Source.
Depth Ramp 50 centimeters Depth at the end of the run that reads white in Depth.
Reach Ramp 50 centimeters Peak depth at any time that reads white in Reach.

Common properties

Property What it does
Id The node's unique name in this graph, shown for reference. You cannot edit it. Scripts and the AI workflow CLI use it to find the node.
Resolution The size of the outputs, in texels across the biome. Relative To Main Input (default) matches the height connected to Height, times the multiplier below it. The simulation runs at Feature Size. Absolute is limited to 32 to 512 in Vista Personal and 32 to 4096 in Vista Indie and Pro.
Split Execution This node always runs over several frames so the editor stays responsive; the viewports update as it bakes. Iteration Per Frame sets the pace.
Bypass Skips the node. The input height comes out of the Flow output unchanged (not a flow mask), and the other outputs are empty. Keep this in mind when you compare with Bypass.

Examples

Water examples run on eroded mountains (Noise, Scale 600, then Hydraulic Erosion 2); lava examples on a Volcano (Height 340) with its Rim as the Source. All on a 1024 × 1024 m biome with a terrain height of 400 m. The 2D view and the red overlay in 3D show Flow. Each bake took about 20 seconds.

Rain

2D: a dense, branching drainage network 3D: streams running down every valley

The defaults, without a Source: rain falls everywhere and gathers into a full drainage network, brightest in the main valleys.

Depth Reach Direction
Depth: pools on flat ground Reach: nearly the same as Depth Direction: a red and green flow map

Depth shows where water stands at the end: on flat ground with no way to drain off the map, it pools in large areas. Reach looks the same here because the rain never stops. Direction is the flow map, red and green for the two flow directions.

Spring water and mud

Spring Water Mud
2D: one stream from the source 2D: a shorter, wider stream
3D: a stream running down a valley from the peak 3D: a mud flow stopping partway down

A small Radial Gradient on the highest peak as the Source. Spring Water runs down into the valley as a stream; Mud is thicker and stops shorter.

Lava on a volcano

Runny Lava Thick Lava
2D: lava streams all around the cone 2D: shorter, wider lava lobes
3D: lava streams running down to the foot 3D: lava lobes stopping on the upper flanks
Depth: thin lava over a wide area, deep in the crater Depth: thicker lava in a smaller area

With the volcano's Rim as the Source, Runny Lava runs in streams down to the foot. Thick Lava has far higher Viscosity and Yield Strength: it crawls, piles up and stops in short lobes on the upper flanks. Depth (bottom row) shows the lava thickness, deepest in the crater.

Recipes

  • Lava down a volcano: Volcano → Hydraulic Erosion 2 → Flow with the volcano's Rim as Source and a lava preset; Depth for the lava texture. Recipe volcano-lava-flow. Crater as the source keeps the lava inside the crater.
  • Riverbeds and banks: final height → Flow (Rain) → Flow output through Levels → weight of a gravel or wet soil layer, and a wider Blur of it for grass along the banks.
  • Animated water: Direction → Copy To RT into a Render Texture for your water shader. It is data, not color: if it ends up in an imported texture, turn sRGB off.
Tip

A small source carries far less liquid than rain over the whole map, so Flow reads black with the Rain range. Use one of the source presets, or lower Flow Min and Flow Max.

Note

Rain floods flat ground that cannot drain off the map, which can hide the lower channels. Source Rate 5 minus Evaporation Rate 4 leaves about 30 cm over 300 steps, plus runoff. Raise evaporation or fade Source Over Time for drier valleys.

Note

Viscous liquids move slowly. If the flow stops short, raise Iteration or Source Rate.

Performance

Heavy compared with most nodes: about 20 seconds per bake on a 1 km biome in the editor. Feature Size and Iteration set the cost. Unchanged nodes load from the cache.

For AI agents

  • Type name: FlowNode. Inputs: Height = 0, Source = 1. Outputs: Flow = 100, Depth = 101, Reach = 102 (Masks), Direction = 103 (ColorTexture).
  • Properties: iterationCount, useAutoIterationPerFrame, iterationPerFrame, featureSize (≥ 1), sourceRate, sourceOverTime, evaporationRate, viscosity (cm), yieldStrength (cm), inertia (0 to 0.95), channeling (0 to 8), roughness (cm), flowMin, flowMax, depthRamp (cm), reachRamp (cm).
  • Presets are editor only; set the values listed in the preset table with node_set.
  • Runs over several frames: capture again until the stats stop changing (about 20 s at 1 km).
  • On this sample, Channeling 0 vs 6 and Evaporation 1 vs 4 changed the rain result very little; their effect shows more on broad, smooth slopes.