Minecraft
Minecraft is known for its seemingly endless computer-generated terrain. Sometimes it looks pretty natural, and other times it looks wild and dramatic. On the Minecraft map, you can find things like:
- hills and mountains,
- oceans, rivers and pounds,
- caves and canyons,
- different biomes.
It makes it interesting, aesthetic, and fun to explore. The same is true for the algorithms and the story behind the scenes.
Tron
“Tron” is a movie from 1982 and for its time, it was a technologically groundbreaking production (though it’s sometimes criticized for its plot). It innovated in visuals and CGI, placing characters in cyberspace using early 3D tools combined with hand work and classical animation. If you like old electronic music, you should also check out the soundtrack scored by Wandy Carlos. The film influenced many artists, later movies and developers.
Perlin noise
Tron came up with a bunch of innovations, including Perlin Noise. It’s an algorithm created by Ken Perlin that’s used for things like computer-generated textures, terrain, 3D models, and so on. The algorithm generates smooth, usually 2-directional, pseudo-random values.
Ken Perlin created this algorithm because similar ones available at the time, like value noise, didn’t look natural (but Tron was a cyberspace, so anyway).
This noise has some useful features, such as:
- You can get a value for any point on demand, the noise doesn’t have to be calculated in advance,
- It looks organic and “natural”,
- Can be generated for different number of dimensions (usually 2, 3, or 4).
Terrain generation in Minecraft
These days, Perlin noise is used in a lot of other places. It’s one of the building blocks for procedural generation - a technique used to automatically generate data based on a developer or artist’s guidelines. Procedural generation makes extensive use of randomness and artistically designed algorithms, making them handy creative tools. You can use them to create all kinds of things, like organic-looking textures and sounds. They’re also the heart of Minecraft’s world generation.
The Perlin noise is an important part of the procedural generation algorithms for the Minecraft terrain. Basically, most of Minecraft’s terrain is a bunch of Perlin noises generated with different parameters and combined together. It’s responsible for generating biomes, terrain height maps, and caves.
Minecraft developers can create different levels of detail and features in the game’s landscapes. They do this by using different noise parameters, layering, and transformations. For example, they can make the terrain relatively flat or cover it with high mountains. To tie it all together and add variety to the landscape, Minecraft generates biomes, which, you’ll never guess, are also generated using a Perlin noise.
Other usage
Perlin noise is often used to create terrain, not only in voxel, blocky environments like Minecraft, but also in realistic games and movies. Even if it’s not used to create all the terrain like in Minecraft, it’s used to add some organic features.
It’s also useful for creating textures where an organic touch is needed. You can find it in raster graphics editors and 3D modeling software (for example, in the node editor in Blender).
You can use it to create ocean waves, realistic fog, volumetric clouds, smoke, and a lot more.
Further reading
If you want to know more about how terrain generation works in Minecraft and how Perlin noise is used, check out this YouTube video by Henrik Kniberg, one of Minecraft’s developers. You can also check out an article on the Minecraft fandom wiki.
You might also want to check out other types of noise that were created to solve some of the problems of Perlin noise, such as Simplex noise, which was also created by Ken Perlin, or Wavelet Noise - developed at Pixar. You can read more about different noise algorithms and examples of their use in the Books of Shaders.
For more inspiration on how to create realistic-looking terrain, read up on erosion generation algorithms. A good starting point is an article on Axel Paris’ blog. I also recommend his works, articles, and blog posts if you’d like to delve deeper into this topic.