-
Notifications
You must be signed in to change notification settings - Fork 18
data noises
Procedural heightmap and textures are generated using noise functions. Noises can be combined using basic operators or be used as source for other noise functions.
Noise sources are function that generate noise values, they don't take another noise as input. Currently only 3 variant of 3D perlin noise and a constant value noise.
- gpunoise:perlin : 3D perlin noise from Brian Sharpe's GPU Noise Lib
- stegu:perlin : 3D perlin noise from Stefan Gustavson's WEBGL Noise Lib
- iq:perlin : 3D perlin noise from Inigo Quilez
- gpunoise:cellular : 3D cellular noise from Brian Sharpe's GPU Noise Lib
- stegu:cellular : 3D cellular noise from Stefan Gustavson's WEBGL Noise Lib
- stegu:cellulardiff : 3D cellular differential noise from Stefan Gustavson's WEBGL Noise Lib
- iq:gradient : 3D gradient noise from Inigo Quilez
- sincos : Sincos noise
Constant noise is created from a float value.
Basic operators are simple mathematical operators applied on the output of the noise source.
- type: add
- list of terms to add
add:
- perlin
- 0.1
- type: sub
- left term
- right term
sub:
- perlin
- 0.1
- type: mul
- List of factors to multiply
mul:
- perlin
- perlin
- type: pow
- base
- exponent
pow:
- perlin
- 2.0
- type: clamp
- noise: Noise source
- min: Minimum value, default is 0.0
- max: Maximum value, default is 1.0
clamp:
noise: perlin
min: 0.0
max: 0.5
- type: abs
- Noise source
abs: perlin
- type: threshold
- Noise source
- Threshold value
theshold:
- perlin
- 0.3
Coordinate transforms operators modify the coordinates used as input for the noise source.
- type: scale
- noise: Noise source
- scale: Scale factor to apply
scale:
noise: perlin
scale: 0.5
- type: offset
- noise: Noise source
- offset: Offset to apply
offset:
noise: perlin
offset: -0.1
Ignore the two other components of the noise coordinates.
- type: 1d
- noise: Noise source
- axis: Coordinate to keep, default is 'z'
1d:
noise: perlin
axis: z
Noise transforms are advanced modification of the noise value.
Any noise function can be modified to scale or offset the output value using the following parameters. The input value range is assumed to be between -1 and 1.
- min: Minimum value of the output, default value is -1.0 or -height scale.
- max: Maximum value of the output, default value is 1.0 or height scale.
- scale: Scale factor of the output, used only is nor min nor max are specified, default value is 1.0 or height scale.
- offset: Offset of the output, used only is nor min nor max are specified, default value is 0.0
noise:
type: fbm
noise: perlin
min: -1000
max: 3200
- type: turbulence
- noise: Noise source
turbulence: perlin
- type: ridged
- noise: Noise source
ridged: perlin
- type: fbm
- noise: Noise source
- octaves: Number of octaves, optional, default value is 8.
- frequency: Fractal frequency, optional.
- length: Fractal length, mandatory unless frequency is specified.
- length-units: Units of the fractal length
- lacunarity: Lacunarity between each octaves, optional, default value is 2.0
- geometric: true if amplitude is multiplied by the gain between each octaves, false if the amplitude is multiplied by the exponent of h, optional, default value is true
- h: Amplitude scale, optional, default value is 0.25
- gain: Amplitude gain, optional, default value is 0.5
noise:
type: fbm
noise: perlin
octaves: 12
gain: 0.7
- type: spiral
- noise: Noise source
- octaves: Number of octaves, optional, default value is 8.
- frequency: Fractal frequency, optional.
- lacunarity: Lacunarity between each octaves, optional, default value is 2.0
- gain: Amplitude gain, optional, default value is 0.5
- nudge: Spiral coefficient.
noise:
type: spiral
noise: perlin
octaves: 12
nudge: 0.7175
- type: warp
- noise: Noise source
- warp: Noise source to warp noise coordinates
- strength: Strength of the warping effect, optional, default value is 4.0
warp:
noise: perlin
warp:
type: fbm
noise: perlin
strength: 2.0
- type: rot
- noise: Noise source
- angle: Rotation angle, can be any function.
- axis: Rotation axis, currently only 'x', 'y' or 'z' is supported. Default is 'x'
rot:
noise: perlin
angle:
type: fbm
noise: perlin
axis: y