Terrain node
hf_erode
Realistic erosion: hydraulic particle (droplet) erosion that carves branching channels and gullies and deposits sediment into valleys and fans, followed by thermal (talus) erosion that crumbles over-steep slopes. Numba-accelerated: 512x512 with defaults takes a few seconds. Writes layers: 'height' (eroded), 'flow' (0..1 water flow intensity, rivers/channels), 'water' (same as flow), 'sediment' (0..1 where material was deposited), 'debris' (0..1 thermal talus deposits), 'erosion' (0..1 how much was removed). Use the masks in hf_to_mesh colouring or hf_scatter. Run after hf_noise and before masking.
Inputs
- 0heightfield
Parameters 15
iterationsintErosion passes. Each pass runs droplets_per_cell x cells water droplets followed by a short thermal pass. 3-6 is good; 10+ = very old, deeply carved terrain.
droplets_per_cellfloatWater droplets per heightfield cell per pass (0.5 x 512^2 = 131k droplets per pass). More = more and finer channels.
strengthfloatOverall hydraulic erosion strength (scales erode rate and capacity). 0.5 gentle, 1 default, 2 strong gullies.
erode_ratefloatFraction of free carrying capacity picked up per step.
deposit_ratefloatFraction of excess sediment dropped per step (higher = sharper alluvial fans).
capacityfloatSediment carrying capacity factor of a droplet.
inertiafloatHow much droplets keep their direction (0 = always follow steepest descent; 0.3 = meandering, wider channels).
evaporationfloatWater loss per step; lower = longer rivers.
lifetimeintMaximum steps a droplet travels.
brush_radiusintRadius in cells over which erosion is spread (1-3; bigger = smoother, wider valleys).
talus_anglefloatThermal erosion: slopes steeper than this angle (degrees) crumble down and pile up as debris. 30-40 natural scree.
thermal_amountfloatThermal erosion strength per step (0 = no thermal erosion).
thermal_stepsintThermal relaxation steps per iteration.
maskstringOptional mask layer: erosion only changes the terrain where mask > 0 (blended).
seedintRandom seed of droplet spawn positions.
Use it
Add it from the node menu (right-click empty graph space or Tab, then type hf_erode), ask the AI for it by name, or add it with a graph op from the API or MCP:
{"op":"add","type":"hf_erode","name":"my_hf_erode","params":{},"inputs":["src"]}Any parameter can also be an expression such as "=sin(F*0.1)". See Parameters & expressions.