Noise/Turbulence

Detailed Description

Functions

Float SNoise (const Vector &p)
 
Float SNoise (const Vector &p, Float t)
 
Float Noise (const Vector &p)
 
Float Noise (const Vector &p, Float t)
 
Float PNoise (const Vector &p, const Vector &d)
 
Float PNoise (const Vector &p, Float t, const Vector &d, Float dt)
 
Float Turbulence (const Vector &p, Float oct, Bool abs)
 
Float Turbulence (const Vector &p, Float t, Float oct, Bool abs)
 
Float WavyTurbulence (const Vector &p, Float t, Float oct, Float start)
 

Function Documentation

◆ SNoise() [1/2]

Float SNoise ( const Vector p)

Generates a signed noise value.

Parameters
[in]pThe noise coordinate.
Returns
The signed noise value, between -1.0 and 1.0.

◆ SNoise() [2/2]

Float SNoise ( const Vector p,
Float  t 
)

Generates a signed noise value.

Parameters
[in]pThe noise coordinate.
[in]tThe time.
Returns
The signed noise value, between -1.0 and 1.0.

◆ Noise() [1/2]

Float Noise ( const Vector p)

Generates a noise value.

Parameters
[in]pThe noise coordinate.
Returns
The noise value, between 0.0 and 1.0.

◆ Noise() [2/2]

Float Noise ( const Vector p,
Float  t 
)

Generates a noise value.

Parameters
[in]pThe noise coordinate.
[in]tThe time.
Returns
The noise value, between 0.0 and 1.0.

◆ PNoise() [1/2]

Float PNoise ( const Vector p,
const Vector d 
)

Generates a periodical noise value.
PNoise is based on SNoise():

#define NOISERES 1024
pnoise = SNoise(Vector(p.x*NOISERES/d.x, p.y*NOISERES/d.y, p.z*NOISERES/d.z));
Parameters
[in]pThe noise coordinate.
[in]dThe period.
Returns
The periodical noise value.

◆ PNoise() [2/2]

Float PNoise ( const Vector p,
Float  t,
const Vector d,
Float  dt 
)

Generates a periodical noise value.
PNoise is based on SNoise():

#define NOISERES 1024
pnoise = SNoise(Vector(p.x*NOISERES/d.x, p.y*NOISERES/d.y, p.z*NOISERES/d.z));
Parameters
[in]pThe noise coordinate.
[in]tThe time.
[in]dThe period.
[in]dtThe time period.
Returns
The periodical noise value.

◆ Turbulence() [1/2]

Float Turbulence ( const Vector p,
Float  oct,
Bool  abs 
)

Generates a turbulence value, this is a sum of multiple noises with different frequency.

Parameters
[in]pThe turbulence coordinate.
[in]octThe number of octaves.
[in]abstrue for the absolute value.
Returns
The turbulence value, between -1.0 and 1.0 unless abs is true, in which case it will be between 0.0 to 1.0.

◆ Turbulence() [2/2]

Float Turbulence ( const Vector p,
Float  t,
Float  oct,
Bool  abs 
)

Generates a turbulence value, this is a sum of multiple noises with different frequency.

Parameters
[in]pThe turbulence coordinate.
[in]tThe time.
[in]octThe number of octaves.
[in]abstrue for the absolute value.
Returns
The turbulence value, between -1.0 and 1.0 unless abs is true, in which case it will be between 0.0 to 1.0.

◆ WavyTurbulence()

Float WavyTurbulence ( const Vector p,
Float  t,
Float  oct,
Float  start 
)

Generates a wavy turbulence value, this is a sum of multiple noises with different frequency.

Parameters
[in]pThe turbulence coordinate.
[in]tThe time.
[in]octThe number of octaves.
[in]startThe start value.
Returns
The turbulence value, between -1.0 and 1.0.