July 14, 2014

Fractal Noise Using Value Noise - Extras

Update 2014-08-13: When I originally wrote this post, I mistakenly referred to value noise as Perlin noise. I have updated this post to refer to the correct types of noise. Read More

Update 2014-11-22: Read more about Perlin noise here!

There are a few useful techniques that I didn’t mention in my last post that can be applied to fractal noise to vary the results.

The following examples will use this noise:

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

value noise

Normalization

In this case, the noise does not utilize the full range of possible values which results in less distinct features.

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

normalized noise

Normalization will spread the values out so they use the full range of possible values.

Gamma Filter

Applying a gamma filter will alter the contrast between the low and high values.

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

gamma filter

The light areas become lighter and the dark areas become darker, creating more of a contrast between the two.

Median Filter

Applying a median filter will replace values with the median value from a small area around it.

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

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

median filter median filter

The result is the change in values becomes smoother, reducing the graininess of the noise.

Interpolation

Interpolation is a process for constructing new values based on a set of values. There are many methods of interpolation.

linear cosine

The noise on the left uses linear interpolation which is the simplest and fastest method, but results in some undesireable artifacts throughout the noise. The noise on the right uses cosine interpolation (the method the example code uses) which is slower but does not produce as pronouced artifacts.