Skip to content

data noises

LD edited this page Aug 26, 2020 · 2 revisions

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

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.

Perlin 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

Cellular noise

  • 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

Gradient noise

  • iq:gradient : 3D gradient noise from Inigo Quilez

Sincos noise

  • sincos : Sincos noise

Constant noise

Constant noise is created from a float value.

Basic operators

Basic operators are simple mathematical operators applied on the output of the noise source.

Addition

Parameters

  • type: add
  • list of terms to add

Example

add:
  - perlin
  - 0.1

Subtraction

Parameters

  • type: sub
  • left term
  • right term

Example

sub:
  - perlin
  - 0.1

Multiplication

Parameters

  • type: mul
  • List of factors to multiply

Example

mul:
  - perlin
  - perlin

Power

Parameters

  • type: pow
  • base
  • exponent

Example

pow:
  - perlin
  - 2.0

Clamp

Parameters

  • type: clamp
  • noise: Noise source
  • min: Minimum value, default is 0.0
  • max: Maximum value, default is 1.0

Example

clamp:
  noise: perlin
  min: 0.0
  max: 0.5

Absolute value

Parameters

  • type: abs
  • Noise source

Example

abs: perlin

Threshold

Parameters

  • type: threshold
  • Noise source
  • Threshold value

Example

theshold:
  - perlin
  - 0.3

Coordinate transforms

Coordinate transforms operators modify the coordinates used as input for the noise source.

Scale

Parameters

  • type: scale
  • noise: Noise source
  • scale: Scale factor to apply

Example

scale:
  noise: perlin
  scale: 0.5

Offset

Parameters

  • type: offset
  • noise: Noise source
  • offset: Offset to apply

Example

offset:
  noise: perlin
  offset: -0.1

1D Value

Ignore the two other components of the noise coordinates.

Parameters

  • type: 1d
  • noise: Noise source
  • axis: Coordinate to keep, default is 'z'

Example

1d:
  noise: perlin
  axis: z

Noise transforms

Noise transforms are advanced modification of the noise value.

Scale and offset

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.

Parameters

  • 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

Example

noise:
    type: fbm
    noise: perlin
    min: -1000
    max: 3200

Turbulence noise

Parameters

  • type: turbulence
  • noise: Noise source

Example

turbulence: perlin

Ridged noise

Parameters

  • type: ridged
  • noise: Noise source

Example

ridged: perlin

Fractal Brownian Noise (FBM)

Parameters

  • 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

Example

noise:
    type: fbm
    noise: perlin
    octaves: 12
    gain: 0.7

Spiral Noise

Parameters

  • 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.

Example

noise:
    type: spiral
    noise: perlin
    octaves: 12
    nudge: 0.7175

Domain Warping Noise

Parameters

  • type: warp
  • noise: Noise source
  • warp: Noise source to warp noise coordinates
  • strength: Strength of the warping effect, optional, default value is 4.0

Example

warp:
    noise: perlin
    warp:
        type: fbm
        noise: perlin
    strength: 2.0

Rotate Noise

Parameters

  • 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'

Example

rot:
    noise: perlin
    angle:
        type: fbm
        noise: perlin
    axis: y
Clone this wiki locally