A Procedural Terrain Adventure in Unity pt.1

Published: (January 12, 2026 at 12:56 PM EST)
2 min read
Source: Dev.to

Source: Dev.to

Noise

Noise is a pattern of values that seem somewhat random but remain smooth and continuous. When generating terrain, we need a way to determine the heights of each point on the landscape. To achieve this, we can generate noise as a simulation of elevation values. There are many different noise algorithms available, but here we’ll just use Perlin noise, one of the most popular and widely‑used approaches.

An image of Perlin noise

In this image, the brightness corresponds to height. Black represents a height of 0.0 and white represents a height of 1.0.

To make our heightmap more visually compelling and realistic, we can introduce octaves.

Octaves

Octaves are multiple layers of noise at different scales, all combined together. Each layer progressively adds finer detail, giving the heightmap much more complexity and realism.

A GIF of Perlin noise moving from 1 to 8 octaves

Notice how each additional octave introduces finer detail. With just one octave the terrain looks smooth and simple. By eight octaves we have a much more natural, complex landscape with detail at multiple scales. Diminishing returns appear after about five octaves, where extra octaves add little noticeable detail but still impact performance.

Persistence and Lacunarity

The behaviour of octaves is primarily controlled by two important parameters: persistence and lacunarity.

Persistence

Persistence controls how much each successive octave contributes to the final noise.

  • High persistence – later octaves remain strong, producing detailed, rough, chaotic terrain.
  • Low persistence – later octaves contribute less, yielding smoother, gentler terrain.

Comparison of low vs. high persistence (lacunarity = 2):

Noise with a persistence of 0.3 and lacunarity of 2

Noise with a persistence of 0.3 and lacunarity of 2

Noise with a persistence of 0.7 and lacunarity of 2

Noise with a persistence of 0.7 and lacunarity of 2

Lacunarity

Lacunarity controls how much the frequency (how “zoomed in” the noise is) increases between each octave.

  • A lacunarity of 2.0 means each octave doubles in frequency.
  • Higher lacunarity creates larger jumps in detail size between octaves.
  • Lower lacunarity yields more similarly sized features across octaves.

Noise with a persistence of 0.5, lacunarity increasing from 1 to 4

Noise with a persistence of 0.5, lacunarity increasing from 1 to 4

We now have a good baseline for creating our own terrain!

Back to Blog

Related posts

Read more »

How To Make Roblox UI

Step 1: Make the UI - Open Roblox Studio. - In the Explorer, go to StarterGui. - Insert a ScreenGui and rename it to MainMenuGui. - Inside MainMenuGui, insert...