Terrain node
hf_flow
Compute water drainage: flow accumulation (how much upstream area drains through each cell) and a river mask. Writes 'flow' (0..1, logarithmic) and 'river' (0..1) and optionally carves riverbeds into 'height'. Use river as a mask for water materials, sand, or to keep trees out of rivers in forest/hf_scatter.
Inputs
- 0heightfield
Parameters 7
methodmenumfd = multiple flow direction (smooth, braided drainage); d8 = single steepest neighbour (thin crisp river lines).
river_thresholdfloatFraction of the whole terrain area that must drain through a cell for it to count as river (0.001 many small streams, 0.02 only big rivers).
river_widthfloatBlur in cells widening the river mask.
carve_depthfloatIf > 0, lower the terrain by up to this many world units along rivers (cuts riverbeds).
fill_depressionstoggleFill pits first so water always reaches the border (true drainage network). Off = water pools in pits.
flow_layerstringLayer receiving normalised log flow accumulation (0..1).
river_layerstringLayer receiving the river mask (0..1).
Use it
Add it from the node menu (right-click empty graph space or Tab, then type hf_flow), ask the AI for it by name, or add it with a graph op from the API or MCP:
{"op":"add","type":"hf_flow","name":"my_hf_flow","params":{},"inputs":["src"]}Any parameter can also be an expression such as "=sin(F*0.1)". See Parameters & expressions.