As an example, here's a 2D slice (the grid shows the integer lattice):
Note: The actual function call depends on the number of arguments, so
calling noise(x,y)
is not the same as calling
noise(x,y,0)
. The former case is a true 2D noise whereas the
latter is 3D. The same difference exists between 3D and 4D.
snoise(args)
is equivalent to 2*noise(args)-1
.
noise
but with a periodic return value: pnoise(point)
=
pnoise(point+period)
. The time value can be either part of the
point or it can be specified separately. The point and period must always
have the same dimension.
The return value is in the range from 0 to 1.
spnoise(args)
is equivalent to 2*pnoise(args)-1
.
As an example, here's a 2D slice (the grid shows the integer lattice):
scellnoise(args)
is equivalent to 2*cellnoise(args)-1
.
sum = 0.0 amp = 1.0 for i in range(octaves): sum += amp*snoise(point) amp *= gain point *= lacunarity
The default values for lacunarity and gain are 2.0 and 0.5. The return value is in the range from 0 to 1.
As an example, here's a 2D slice (the grid shows the integer lattice):
fBm
.
The difference is that it sums up abs(snoise)
instead of
noise
.
However, the return value is in the range from 0 to 1 again.
As an example, here's a 2D slice (the grid shows the integer lattice):
vnoise((x,y,z))
returns a vec3, just as a call to
vnoise((x,y,z),t)
. However, a call to
vnoise((x,y,z,t))
returns a vec4.
noise()
.
snoise()
.
pnoise()
.
spnoise()
.
cellnoise()
.
scellnoise()
.
fBm()
.
turbulence()
.