Noise/Turbulence 函数

详细描述

函数

Float   SNoise (const 向量 &p)
Float   SNoise (const 向量 &p, Float t)
Float   噪声 (const 向量 &p)
Float   噪声 (const 向量 &p, Float t)
Float   PNoise (const 向量 &p, const 向量 &d)
Float   PNoise (const 向量 &p, Float t, const 向量 &d, Float dt)
Float   Turbulence (const 向量 &p, Float oct, Bool abs)
Float   Turbulence (const 向量 &p, Float t, Float oct, Bool abs)
Float   WavyTurbulence (const 向量 &p, Float t, Float oct, Float start)

Function Documentation

◆  SNoise() [1/2]

Float SNoise ( const 向量 p )

Generates a signed noise value.

参数
[in] p The noise coordinate.
返回
The signed noise value, between -1.0 and 1.0 .

◆  SNoise() [2/2]

Float SNoise ( const 向量 p ,
Float   t  
)

Generates a signed noise value.

参数
[in] p The noise coordinate.
[in] t The time.
返回
The signed noise value, between -1.0 and 1.0 .

◆  Noise() [1/2]

Float 噪声 ( const 向量 p )

Generates a noise value.

参数
[in] p The noise coordinate.
返回
The noise value, between 0.0 and 1.0 .

◆  Noise() [2/2]

Float 噪声 ( const 向量 p ,
Float   t  
)

Generates a noise value.

参数
[in] p The noise coordinate.
[in] t The time.
返回
The noise value, between 0.0 and 1.0 .

◆  PNoise() [1/2]

Float PNoise ( const 向量 p ,
const 向量 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));
参数
[in] p The noise coordinate.
[in] d The period.
返回
The periodical noise value.

◆  PNoise() [2/2]

Float PNoise ( const 向量 p ,
Float   t ,
const 向量 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));
参数
[in] p The noise coordinate.
[in] t The time.
[in] d The period.
[in] dt The time period.
返回
The periodical noise value.

◆  Turbulence() [1/2]

Float Turbulence ( const 向量 p ,
Float   oct ,
Bool   abs  
)

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

参数
[in] p The turbulence coordinate.
[in] oct The number of octaves.
[in] abs true for the absolute value.
返回
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 向量 p ,
Float   t ,
Float   oct ,
Bool   abs  
)

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

参数
[in] p The turbulence coordinate.
[in] t The time.
[in] oct The number of octaves.
[in] abs true for the absolute value.
返回
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 向量 p ,
Float   t ,
Float   oct ,
Float   start  
)

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

参数
[in] p The turbulence coordinate.
[in] t The time.
[in] oct The number of octaves.
[in] start The start value.
返回
The turbulence value, between -1.0 and 1.0 .