November 21, 2014

Fractal Noise Using Perlin Noise

As a followup to my past revelation about Perlin noise, I wanted to show what fractal noise looked like using actual Perlin noise instead of value noise.

In my first post, I showed how multiple octaves of value noise could be combined to create fractal noise. The same method works with Perlin noise, however Perlin noise looks a little different.

./bin/fractal_noise --algorithm perlin --output-octaves

octave 0octave 1octave 2

octave 3octave 4octave 5

Combine the above octaves to get the following fractal noise:

fractal noise

Octaves

./bin/fractal_noise --algorithm perlin --octaves 5

./bin/fractal_noise --algorithm perlin --octaves 7

5 octaves6 octaves7 octaves

Persistence

./bin/fractal_noise --algorithm perlin --persistence 0.3

./bin/fractal_noise --algorithm perlin --persistence 0.9

0.3 persistence0.6 persistence0.9 persistence


In my second post, I showed how applying filters to fractal noise can vary the output. This time I’ll use Perlin noise.

./bin/fractal_noise -a perlin -w 256 -h 256 --octaves 8

fractal noise

Normalization

./bin/fractal_noise -a perlin -w 256 -h 256 --octaves 8 -n

fractal noise

Gamma Filter

./bin/fractal_noise -a perlin -w 256 -h 256 --octaves 8 -n -g 1.2

fractal noise

Median Filter

./bin/fractal_noise -a perlin -w 256 -h 256 --octaves 8 -n -g 1.2 -m 2

./bin/fractal_noise -a perlin -w 256 -h 256 --octaves 8 -n -g 1.2 -m 8

median filter 2median filter 8

Interpolation

Unlike value noise, Perlin noise seems to work better with linear interpolation.

linear interpolationcosine interpolation

The first image uses linear interpolation. The second image uses cosine interpolation which causes obvious edges throughout the noise.

linear fractalcosine fractal

The resulting fractal noise, however, is less noticeably different.


My final post explained how particular sizes of fractal noise could be tiled. The same principle applies to fractal noise using Perlin noise.

./bin/fractal_noise -a perlin --seed 42 --octaves 7 -h 128 -w 128 -n

./bin/terrain -a perlin --seed 42 --octaves 7 -h 128 -w 128

perlin tileterrain tile

perlin tiledterrain tiled

Terrain generation with Perlin noise ends up looking fairly similar to value noise.