← 🌿 Nature

🏔️ Terrain Generator

Color Mode
Verts:
FPS:
Drag — rotate · Scroll — zoom

🏔️ Procedural Terrain Generator

Generate infinite photorealistic 3D landscapes in real time. Fractal Brownian motion, domain warping, and GPU-accelerated hydraulic erosion combine to create believable mountain ranges, valleys, and river systems.

🔬 What It Demonstrates

Terrain height uses Fractional Brownian Motion (layered Perlin noise octaves). Then thousands of simulated water droplets perform hydraulic erosion, carving valleys and depositing sediment to create geologically plausible terrain.

🎮 How to Use

Drag the seed number to explore different terrains. Adjust octaves, lacunarity, and persistence to change roughness. Increase erosion iterations to see more realistic river-carved landscapes.

💡 Did You Know?

NASA uses the same fBm algorithm to generate planetary surface models for space missions. Hello Games (No Man's Sky) uses procedural generation to create 18 quintillion unique planets from a few mathematical rules.

About Procedural Terrain Generator (fBm + Hydraulic Erosion)

This generator builds a 3D heightmap from fractal Brownian motion, summing several octaves of Perlin noise at increasing frequencies and decreasing amplitudes to produce naturalistic mountains, valleys and plains. A hydraulic erosion pass then simulates water droplets that pick up, transport and deposit sediment, carving realistic river channels and softening slopes, while biome colouring and an adjustable sea level shade the result.

Fractal Brownian motion is a cornerstone of procedural content generation because real landscapes are self-similar across scales, so layering noise at multiple frequencies mimics how large landforms host ever-finer detail. Combined with erosion algorithms, these techniques generate the terrain in countless video games, film backdrops and geographic visualisations, and they echo the fractal mathematics used to describe natural coastlines and mountains.

Frequently Asked Questions

What is fractal Brownian motion (fBm)?

Fractal Brownian motion sums multiple layers, or octaves, of coherent noise. Each successive octave has higher frequency and lower amplitude, so broad landforms emerge from the low octaves while the high octaves add fine surface detail, producing terrain that looks natural at every zoom level.

What is Perlin noise and why use it?

Perlin noise is a gradient noise function that produces smooth, continuous pseudo-random values with no harsh discontinuities. Its smoothness makes it ideal for terrain, since adjacent points vary gradually like real elevation rather than jumping randomly.

How does hydraulic erosion work in this simulation?

Virtual water droplets are dropped onto the heightmap and flow downhill. As they move they erode material from steep areas, carry it as sediment, and deposit it where the slope flattens, gradually carving valleys and river channels into the noise-based terrain.

What does the sea level slider do?

It sets a horizontal water plane; any terrain below that height is rendered as ocean or lakes. Raising sea level floods low ground and turns the map into islands, while lowering it exposes more land and deeper valleys.

How are biome colours chosen?

Colours are assigned mainly by elevation, and sometimes slope: low ground near water is shaded as beach or grassland, mid elevations as forest or rock, and the highest peaks as bare stone or snow.

Can I get the same terrain twice?

Yes, if the underlying noise uses the same seed. A fixed seed makes the procedural generation deterministic, so identical parameters reproduce identical terrain, which is essential for sharing or regenerating a specific landscape.

What do octaves and persistence control?

More octaves add finer detail and roughness, while persistence sets how quickly amplitude falls off across octaves. High persistence keeps high-frequency octaves strong for jagged terrain; low persistence yields smoother, rolling hills.

Why does erosion make terrain look more realistic?

Pure noise produces statistically random bumps, but real terrain is shaped by water carving connected drainage networks. Erosion adds those branching valleys and ridgelines, giving the heightmap geologically plausible structure.

Can I export the generated terrain?

Yes, the generator supports exporting the heightmap as a PNG image, where pixel brightness encodes elevation. That heightmap can be reused in game engines, 3D software or other terrain tools.

Where are these techniques used in industry?

fBm and erosion drive terrain in open-world games, procedural film environments, flight and driving simulators, and scientific landscape visualisation, because they generate vast, varied, believable worlds without hand-modelling every hill.