Multiple noise functions, in both scalar and vector flavors. More...
Perlin Noise | |
AI_API AI_DEVICE AI_CONST float | AiPerlin2 (AtVector2 p) |
Two-dimensional Perlin noise function. More... | |
AI_API AI_DEVICE AI_CONST float | AiPerlin3 (AtVector p) |
Three-dimensional Perlin noise function. More... | |
AI_API AI_DEVICE AI_CONST float | AiPerlin4 (AtVector p, float time) |
Four-dimensional Perlin noise function. More... | |
Periodic Perlin Noise | |
AI_API AI_DEVICE AI_CONST float | AiPeriodicPerlin2 (AtVector2 p, int periodx, int periody) |
Two-dimensional Periodic Perlin noise function. More... | |
AI_API AI_DEVICE AI_CONST float | AiPeriodicPerlin3 (AtVector p, int periodx, int periody, int periodz) |
Three-dimensional Periodic Perlin noise function. More... | |
AI_API AI_DEVICE AI_CONST float | AiPeriodicPerlin4 (AtVector p, float time, int periodx, int periody, int periodz, int periodt) |
Four-dimensional Periodic Perlin noise function. More... | |
Summed-Noise | |
AI_API AI_DEVICE AI_CONST float | AiNoise2 (AtVector2 p, int octaves, float distortion, float lacunarity) |
Two-dimensional fractal noise function. More... | |
AI_API AI_DEVICE AI_CONST float | AiNoise3 (AtVector p, int octaves, float distortion, float lacunarity) |
Three-dimensional fractal noise function. More... | |
AI_API AI_DEVICE AI_CONST float | AiNoise4 (AtVector p, float time, int octaves, float distortion, float lacunarity) |
Four-dimensional fractal noise function. More... | |
AI_API AI_DEVICE AI_CONST AtVector2 | AiVNoise2 (AtVector2 p, int octaves, float distortion, float lacunarity) |
Two-dimensional fractal vector noise function. More... | |
AI_API AI_DEVICE AI_CONST AtVector | AiVNoise3 (AtVector p, int octaves, float distortion, float lacunarity) |
Three-dimensional fractal vector noise function. More... | |
AI_API AI_DEVICE AI_CONST AtVector | AiVNoise4 (AtVector p, float time, int octaves, float distortion, float lacunarity) |
Four-dimensional fractal vector noise function. More... | |
Cellular Noise | |
AI_API AI_DEVICE void | AiCellular (AtVector p, int n, int octaves, float lacunarity, float randomness, float *F, AtVector *delta=NULL, uint32_t *ID=NULL) |
Three-dimensional fractal cellular noise function. More... | |
AI_API AI_DEVICE AI_CONST float | AiCellNoise2 (AtVector2 p) |
Two-dimensional cell noise function. More... | |
AI_API AI_DEVICE AI_CONST float | AiCellNoise3 (AtVector p) |
Three-dimensional cell noise function. More... | |
AI_API AI_DEVICE AI_CONST float | AiCellNoise4 (AtVector p, float t) |
Four-dimensional cell noise function. More... | |
AI_API AI_DEVICE AI_CONST AtVector2 | AiVCellNoise2 (AtVector2 p) |
Two-dimensional vector cell noise function. More... | |
AI_API AI_DEVICE AI_CONST AtVector | AiVCellNoise3 (AtVector p) |
Three-dimensional vector cell noise function. More... | |
AI_API AI_DEVICE AI_CONST AtVector | AiVCellNoise4 (AtVector p, float t) |
Four-dimensional vector cell noise function. More... | |
Multiple noise functions, in both scalar and vector flavors.
AI_API AI_DEVICE AI_CONST float AiPerlin2 | ( | AtVector2 | point | ) |
Two-dimensional Perlin noise function.
This is an optimized version of Perlin noise for two dimensions. The statistical properties of AiPerlin2() are the same as that of AiPerlin3() but, because of the reduced dimensionality, it needs fewer calculations and thus runs approximately twice as fast.
point | 2D point where the noise is evaluated |
AI_API AI_DEVICE AI_CONST float AiPerlin3 | ( | AtVector | point | ) |
Three-dimensional Perlin noise function.
This is the basic building block for many procedural texturing effects.
point | 3D point where the noise is evaluated |
AI_API AI_DEVICE AI_CONST float AiPerlin4 | ( | AtVector | point, |
float | time | ||
) |
Four-dimensional Perlin noise function.
point | first three components of the 4D point where the noise is evaluated, usually the "spatial" components |
time | fourth component of the 4D point, usually the "time" component |
AI_API AI_DEVICE AI_CONST float AiPeriodicPerlin2 | ( | AtVector2 | point, |
int | periodx, | ||
int | periody | ||
) |
Two-dimensional Periodic Perlin noise function.
This is a periodic version of the perlin noise function. The values are guaranteed to repeat themselves every "period" units. The period must be a positive integer.
point | 2D point where the noise is evaluated |
periodx | period in the x direction |
periody | period in the y direction |
AI_API AI_DEVICE AI_CONST float AiPeriodicPerlin3 | ( | AtVector | point, |
int | periodx, | ||
int | periody, | ||
int | periodz | ||
) |
Three-dimensional Periodic Perlin noise function.
This is a periodic version of the perlin noise function. The values are guaranteed to repeat themselves every "period" units. The period must be a positive integer.
point | 3D point where the noise is evaluated |
periodx | period in the x direction |
periody | period in the y direction |
periodz | period in the z direction |
AI_API AI_DEVICE AI_CONST float AiPeriodicPerlin4 | ( | AtVector | point, |
float | time, | ||
int | periodx, | ||
int | periody, | ||
int | periodz, | ||
int | periodt | ||
) |
Four-dimensional Periodic Perlin noise function.
This is a periodic version of the perlin noise function. The values are guaranteed to repeat themselves every "period" units. The period must be a positive integer.
point | first three components of the 4D point where the noise is evaluated, usually the "spatial" components |
time | fourth component of the 4D point, usually the "time" component |
periodx | period in the x direction |
periody | period in the y direction |
periodz | period in the z direction |
periodt | period in the t direction |
AI_API AI_DEVICE AI_CONST float AiNoise2 | ( | AtVector2 | p, |
int | octaves, | ||
float | distortion, | ||
float | lacunarity | ||
) |
Two-dimensional fractal noise function.
This is an optimized version of AiNoise3() for two dimensions.
p | 2D point where the noise is evaluated |
octaves | number of octaves |
distortion | amount of distortion applied to point p before evaluating the noise |
lacunarity | how wide apart successive octaves are |
AI_API AI_DEVICE AI_CONST float AiNoise3 | ( | AtVector | p, |
int | octaves, | ||
float | distortion, | ||
float | lacunarity | ||
) |
Three-dimensional fractal noise function.
This noise signal is built upon multiple octaves of Perlin noise, as computed in AiPerlin3(). A single octave is guaranteed to be on [-1,1], but the summing of multiple octaves is not normalized by the maximum possible value, so it can easily go outside of [-1,1]. For example, with a lacunarity value of 2, the noise signal will be on [-2,2].
If distortion is greater than zero, the input point is distorted, or "warped", with a call to AiVNoise3(). This happens per-octave, which can make distortion very expensive.
p | 3D point where the noise is evaluated |
octaves | number of octaves |
distortion | amount of distortion applied to point p before evaluating the noise |
lacunarity | how wide apart successive octaves are (a popular value is 1.92) |
AI_API AI_DEVICE AI_CONST float AiNoise4 | ( | AtVector | p, |
float | time, | ||
int | octaves, | ||
float | distortion, | ||
float | lacunarity | ||
) |
Four-dimensional fractal noise function.
p | first three components of the 4D point where the noise is evaluated, usually the "spatial" components |
time | fourth component of the 4D point, usually the "time" component |
octaves | number of octaves |
distortion | amount of distortion applied to point p before evaluating the noise |
lacunarity | how wide apart successive octaves are (a popular value is 1.92) |
AI_API AI_DEVICE AI_CONST AtVector2 AiVNoise2 | ( | AtVector2 | p, |
int | octaves, | ||
float | distortion, | ||
float | lacunarity | ||
) |
Two-dimensional fractal vector noise function.
Optimized version of AiVNoise3() for two-dimensions. Statistical properties are the same but runs much faster.
p | 2D point where the noise is evaluated |
octaves | number of octaves |
distortion | amount of distortion applied to point p before evaluating the noise |
lacunarity | how wide apart successive octaves are |
AI_API AI_DEVICE AI_CONST AtVector AiVNoise3 | ( | AtVector | p, |
int | octaves, | ||
float | distortion, | ||
float | lacunarity | ||
) |
Three-dimensional fractal vector noise function.
Vector-valued version of AiNoise3(), equivalent to independent signals of fractal noise in each of the three dimensions, and thus 3x slower to compute.
p | 3D point where the noise is evaluated |
octaves | number of octaves |
distortion | amount of distortion applied to point p before evaluating the noise |
lacunarity | how wide apart successive octaves are |
AI_API AI_DEVICE AI_CONST AtVector AiVNoise4 | ( | AtVector | p, |
float | time, | ||
int | octaves, | ||
float | distortion, | ||
float | lacunarity | ||
) |
Four-dimensional fractal vector noise function.
p | first three components of the 4D point where the noise is evaluated, usually the "spatial" components |
time | fourth component of the 4D point, usually the "time" component |
octaves | number of octaves |
distortion | amount of distortion applied to point p before evaluating the noise |
lacunarity | how wide apart successive octaves are |
AI_API AI_DEVICE void AiCellular | ( | AtVector | p, |
int | n, | ||
int | octaves, | ||
float | lacunarity, | ||
float | randomness, | ||
float * | F, | ||
AtVector * | delta, | ||
uint32_t * | ID | ||
) |
Three-dimensional fractal cellular noise function.
A fractal implementation of the cellular texturing basis function popularized by Steve Worley. This function returns the n closest feature point distances F_1, F_2, ... F_n, the vector delta to those points, and a 32-bit seed for each of the feature points.
p | 3D point where the cellular field is evaluated | |
n | number of closest points to be simultaneously returned in F, up to a maximum of 5 | |
octaves | number of stacked up scales of cellular noise | |
lacunarity | how wide apart successive octaves are (a good default value is 1.92) | |
randomness | a value in the range [0, 1] that, if close to 0, produces grid-like regular structures, so most of the time it's better left at 1 | |
[out] | F | if non-NULL, this array will hold the n output values of F_1, F_2, ... F_n in F[0], F[1], ... F[n-1] with an average F_1 value of 1 |
[out] | delta | if non-NULL, this array will hold the output vector difference between the sample point and the n-th closest feature point. Thus, the feature point's location is the hit point minus this value. The derivative of F is the unit normalized version of this vector |
[out] | ID | if non-NULL, this array will hold the output 32-bit ID number which labels each feature point, useful for domain partitions, especially for coloring flagstone patterns |
AI_API AI_DEVICE AI_CONST float AiCellNoise2 | ( | AtVector2 | p | ) |
Two-dimensional cell noise function.
This function returns a deterministic random value inside each integer lattice cell.
p | 2D point where the noise is evaluated |
AI_API AI_DEVICE AI_CONST float AiCellNoise3 | ( | AtVector | p | ) |
Three-dimensional cell noise function.
This function returns a deterministic random value inside each integer lattice cell.
p | 3D point where the noise is evaluated |
AI_API AI_DEVICE AI_CONST float AiCellNoise4 | ( | AtVector | p, |
float | t | ||
) |
Four-dimensional cell noise function.
This function returns a deterministic random value inside each integer lattice cell.
p | 3D point where the noise is evaluated |
t | time value where the noise is evaluated |
Two-dimensional vector cell noise function.
This function returns a 2D deterministic random value inside each integer lattice cell.
p | 2D point where the noise is evaluated |
Three-dimensional vector cell noise function.
This function returns a 3D deterministic random value inside each integer lattice cell.
p | 3D point where the noise is evaluated |
Four-dimensional vector cell noise function.
This function returns a 3D deterministic random value inside each integer lattice cell.
p | 3D point where the noise is evaluated |
t | time value where the noise is evaluated |