What is Perlin Noise?

Perlin Noise

 Hello everyone, it's been a while (about a month) since I wrote an informative article, today I found some time and decided to write a post about a new piece of information that could be useful for your projects.

What is Perlin Noise?

What is Noise?

Before Perlin Noise, I want to give you some information about the concept of noise. The term "noise" is typically translated into Turkish as "gürültü" (meaning disturbance/static).

Noise is generally used in computers to generate random numbers and to create images using these numbers, that is, it is used to create randomness in images called CGI. Now, someone who knows nothing about this might ask, why did they call this noise? I asked this too, and the answer I found was quite satisfying.

The main reason these random patterns are called noise is that, back in the day, devices like TVs and radios would experience interference/mixed electrical or radio signals, resulting in that static image and crackling sound, which is where the name comes from.

If we need to give an example of a noise image, the illustration below will be quite illuminating for us.

Standard Noise

I think we more or less understand what noise is now, so let's move on to explaining Perlin Noise.

Perlin Noise

Perlin Noise is a noise-generating algorithm developed by Ken Perlin while working on the Tron movie. There are many noise algorithms like Perlin Noise.

Perlin Noise was invented in the early 1980s by Ken Perlin, and in 1997, Ken Perlin received an Academy Award in technical achievement for his work on this algorithm.

Perlin Noise has a more natural appearance and a more natural oscillation motion than standard random generative methods, which allows us to obtain more naturally appearing randomness in our projects.

If you are somewhat familiar with computers and software, you would know that to generate random numbers, you set a seed, and from that seed, you start generating random numbers. However, when you try to display these random numbers on an image, it can result in a very absurd appearance or might not provide you the natural look you desire. Noticing this issue, Ken Perlin developed Perlin Noise, an algorithm that allows us to obtain more natural-looking random images—in fact, textures. This is what we know today as Perlin Noise.

If you are curious about an image generated with Perlin Noise, the image below is created with Perlin Noise.

Perlin Noise

What are the Usage Areas of Perlin Noise?

Up to here, we have actually understood what Perlin Noise is. Now, let’s take a look at the areas where it can be used.

As a game designer, I can give you many examples of the use of Perlin Noise from my own field.

The waves of the sea in games, the shapes of clouds in the sky—Perlin Noise is used wherever a natural effect is needed.

When variation is desired in repeating in-game shapes but the desire is to avoid creating too many models and textures, patterns can be generated on game models with Perlin Noise, making it appear to the player as if many textures were drawn—while it’s actually just a single changing image.

We use it for creating maps in games. Perlin Noise makes generating truly nice random hills much easier. If you want an example, one of the world’s best-selling games, Minecraft, has a map generated entirely using the Perlin Noise algorithm.

We can also use it in movies and games to create effects like fire or explosions.

As you can see, Perlin Noise actually plays a very important role in the film and gaming industries.

Perlin Noise 2D Perlin Noise 3D

If I need to give an example from my own projects, I can show you a water effect I created in Unity.