Question

I'm just starting to get the hang of Perlin Noise in general, but many sites I've read up on in regards to terrain generation refer to a falloff value.

It seems quite typical in 3D (cube-based terrain) to use the result of a 3D Perlin Noise function as a density test, where if it's greater than 0 it's land, less than or equal to 0 is air. Then simply offset the result from the function by the current y value before you do the density test to get smooth semi-flat terrain.

What I don't understand is what is meant in regards to a falloff value.

Can someone please explain what a falloff value in this sense is referring to, perhaps even using a code example?

Was it helpful?

Solution

The falloff is used to determine the weight of the octaves. You can either use explicit weights, which allows you to customize the result in a wider variety. Or you can use implicit weights with a falloff value. This will set the weights to an exponential function.

E.g. if you have a falloff value of 0.5, then the octaves' weights are as follows (unnormalized)

Octave 1: 1 = falloff ^ 0
Octave 2: 1 * 0.5 = 0.5 = falloff ^ 1
Octave 3: 0.5 * 0.5 = 0.25 = falloff ^ 2
Octave 4: 0.25 * 0.5 = 0.125 = falloff ^ 3

The overall result is calculated with

Sum [i] ( (value of octave i) * (weight i) )

Typically a normalization is needed, so that weights sum up to 1.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top