Skip to content
SpecializedSource checked

Hydraulic Erosion

Shapes terrain by simulating water carrying and depositing sediment.

Quick Facts

Compact metadata for implementation and discovery.

Category
Procedural Generation
Difficulty
Advanced
Family
Terrain Erosion
Tier
Specialized
Status
Verified
Review
Source Checked
Sources
2
Formulas
1
Relationships
3
Code example
Ready
Visualization
Ready

Overview

Hydraulic Erosion moves water over a height field, eroding steep areas and depositing sediment where flow slows or capacity drops.

Core Concepts

water flowsediment capacityheight fieldmaterial deposition

Quick facts

Complexity

Runtime and memory behavior at a glance.

Best

O(cells)

Average

O(steps * cells)

Worst

O(steps * cells)

Space

O(cells)

When to Use

  • Use when generated terrain needs river-like channels and natural wear.
  • Use when terrain realism is a central requirement.

When Not to Use

  • Avoid when fast stylized terrain generation is more important than erosion detail.
  • Avoid when the generator cannot enforce the playability, connectivity, or style constraints required.

What It Does

  • Moves water over terrain
  • Computes sediment capacity
  • Erodes or deposits material
  • Evaporates water over time

Use Cases

  • Terrain realism
  • River channel generation
  • Heightmap post-processing

Inputs

  • Height field
  • Rain or droplet settings
  • Erosion parameters

Outputs

  • Eroded height field

Key Formulas (1)

Sediment capacity

capacity = slope · wateramount · velocity · factor
capacity = slope * water_amount * velocity * factor

Estimates how much material moving water can carry.

Pseudocode

  1. 1.Add water to terrain
  2. 2.Move water downhill
  3. 3.Compute sediment capacity from slope and flow
  4. 4.Erode when sediment is below capacity
  5. 5.Deposit when sediment exceeds capacity
  6. 6.Evaporate water

Canonical Example

Input
heightmap has a steep slope, water flows downhill
Output
channel is carved along the slope
Explanation
Flowing water removes sediment where capacity is high.

Implementation Notes

  • Run erosion on a copy and blend the result so the effect can be controlled.
  • Expose seed, scale, and constraint parameters so outputs can be reproduced.
  • Keep a tiny example with expected output beside the implementation.

Common Pitfalls

  • Unbounded erosion can flatten or destroy useful terrain features.
  • Random-looking output can still contain repeated patterns, dead ends, or invalid regions.
  • Not defining boundary, empty, or degenerate inputs before implementation.

Interactive Mechanism Walkthrough

2D Grid Wavefront & Trajectory

Show water paths carving channels into a heightmap.

S
#
#
#
#
#
#
#
G
Step 1 of 6: Add water to terrain
generated-grid

Notes

Small parameter changes can dramatically affect terrain style.

Sources (2)

What each reference supports for this entry.

Texturing and Modeling: A Procedural Approach

Book

Procedural terrain reference for erosion-style height-field modification and terrain texturing.

Interactive Terrain Modeling Using Hydraulic Erosion

Paper

Reference for interactive hydraulic terrain erosion with water flow, sediment transport, and deposition.

Open source

Explore Next

Good next jumps from the relationship graph, ranked for useful discovery.

Alternative toThermal Erosion

Hydraulic and thermal erosion are terrain-weathering simulations with different transport models.

Tags

Procedural GenerationTerrainErosionSimulation