
Procedural Terrain Generation with Perlin Noise in Unity
June 29, 2026
Infinite Procedural Terrain with Biomes in Unity (Chunk System)
June 29, 2026Procedural terrain becomes much more interesting when the world contains different environments such as deserts, forests, and snowy mountains. These environments are called biomes.
A biome system allows your terrain to change visually and structurally depending on location, temperature, humidity, or noise values.
Many open-world games use biome systems to create believable and diverse worlds.
What Is a Biome?
A biome is a region of terrain with specific characteristics such as:
- Terrain height
- Temperature
- Moisture
- Vegetation
- Surface textures
For example:
- Desert → sand, flat terrain, few plants
- Forest → grass, trees, moderate hills
- Snow → mountains, snow textures, cold climate
Basic Idea Behind Biome Generation
The most common approach is to generate two noise maps:
- Temperature map
- Moisture map
By combining these maps, you can determine which biome a location belongs to.
For example:
- Low temperature → Snow biome
- High temperature + low moisture → Desert
- Medium temperature + high moisture → Forest
Generating Noise Maps
float temperature = Mathf.PerlinNoise(x * tempScale, z * tempScale); float moisture = Mathf.PerlinNoise(x * moistureScale, z * moistureScale);
Both values will be between 0 and 1.
Choosing the Biome
We can determine the biome using simple conditions.
string GetBiome(float temperature, float moisture)
{
if (temperature < 0.3f)
return "Snow";
if (temperature > 0.7f && moisture < 0.3f)
return "Desert";
if (moisture > 0.5f)
return "Forest";
return "Plains";
}
This function decides which biome should appear at a given position.
Applying Biomes to Terrain Height
Each biome can have a different height profile.
float GetHeight(float x, float z, string biome)
{
float baseNoise = Mathf.PerlinNoise(x * 0.05f, z * 0.05f);
switch (biome)
{
case "Snow":
return baseNoise * 10f; // taller mountains
case "Desert":
return baseNoise * 2f; // flatter terrain
case "Forest":
return baseNoise * 5f; // rolling hills
default:
return baseNoise * 3f;
}
}
Now different regions will have different terrain shapes.
Applying Textures to Biomes
To make biomes visually distinct, assign different textures:
- Snow biome → snow texture
- Desert biome → sand texture
- Forest biome → grass texture
In Unity Terrain, this is usually done with terrain layers or splat maps.
Spawning Biome Objects
Each biome can spawn different objects:
- Forest → trees, rocks
- Desert → cactus, dunes
- Snow → pine trees, snow rocks
void SpawnObjects(string biome, Vector3 position)
{
if (biome == "Forest")
Instantiate(treePrefab, position, Quaternion.identity);
if (biome == "Desert")
Instantiate(cactusPrefab, position, Quaternion.identity);
}
Smoothing Biome Transitions
Hard biome borders look unnatural. To fix this, blend terrain properties using interpolation.
float blend = Mathf.SmoothStep(0,1,temperature); height = Mathf.Lerp(desertHeight, forestHeight, blend);
This creates natural transitions between environments.
Performance Tips
- Generate biomes per chunk instead of the whole world
- Cache noise maps
- Use object pooling for vegetation
- Use LOD systems for trees and terrain
Real Games Using Biome Systems
- Minecraft
- No Man’s Sky
- Valheim
- Terraria
These games generate massive worlds by combining noise maps and biome rules.
Final Thoughts
Biome-based terrain generation makes procedural worlds feel alive. By combining noise maps, terrain rules, and environmental assets, you can create endless unique landscapes.
Once your biome system is in place, expanding your world becomes much easier.
Just add new biome rules and let the generator do the work.








