Procedural Texturing API

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

Detailed Description

Multiple noise functions, in both scalar and vector flavors.


Function Documentation

◆ AiPerlin2()

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.

Parameters
point2D point where the noise is evaluated
Returns
a value in the range [-1, 1]
See also
AiPerlin3

◆ AiPerlin3()

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.

Note
Adapted from Ken Perlin's improved noise: "Improving Noise", Computer Graphics, Vol. 35, No. 3. http://mrl.nyu.edu/~perlin/paper445.pdf
Parameters
point3D point where the noise is evaluated
Returns
a value in the range [-1, 1]

◆ AiPerlin4()

AI_API AI_DEVICE AI_CONST float AiPerlin4 ( AtVector  point,
float  time 
)

Four-dimensional Perlin noise function.

Parameters
pointfirst three components of the 4D point where the noise is evaluated, usually the "spatial" components
timefourth component of the 4D point, usually the "time" component
Returns
a value in the range [-1, 1]
See also
AiPerlin3

◆ AiPeriodicPerlin2()

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.

Parameters
point2D point where the noise is evaluated
periodxperiod in the x direction
periodyperiod in the y direction
Returns
a value in the range [-1, 1]
See also
AiPerlin2

◆ AiPeriodicPerlin3()

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.

Parameters
point3D point where the noise is evaluated
periodxperiod in the x direction
periodyperiod in the y direction
periodzperiod in the z direction
Returns
a value in the range [-1, 1]
See also
AiPerlin3

◆ AiPeriodicPerlin4()

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.

Parameters
pointfirst three components of the 4D point where the noise is evaluated, usually the "spatial" components
timefourth component of the 4D point, usually the "time" component
periodxperiod in the x direction
periodyperiod in the y direction
periodzperiod in the z direction
periodtperiod in the t direction
Returns
a value in the range [-1, 1]
See also
AiPerlin4

◆ AiNoise2()

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.

Parameters
p2D point where the noise is evaluated
octavesnumber of octaves
distortionamount of distortion applied to point p before evaluating the noise
lacunarityhow wide apart successive octaves are
Returns
un-normalized noise value, possibly outside the range [-1, 1]
See also
AiNoise3

◆ AiNoise3()

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.

Parameters
p3D point where the noise is evaluated
octavesnumber of octaves
distortionamount of distortion applied to point p before evaluating the noise
lacunarityhow wide apart successive octaves are (a popular value is 1.92)
Returns
un-normalized noise value, possibly outside the range [-1, 1]
See also
AiPerlin3, AiVNoise3

◆ AiNoise4()

AI_API AI_DEVICE AI_CONST float AiNoise4 ( AtVector  p,
float  time,
int  octaves,
float  distortion,
float  lacunarity 
)

Four-dimensional fractal noise function.

Parameters
pfirst three components of the 4D point where the noise is evaluated, usually the "spatial" components
timefourth component of the 4D point, usually the "time" component
octavesnumber of octaves
distortionamount of distortion applied to point p before evaluating the noise
lacunarityhow wide apart successive octaves are (a popular value is 1.92)
Returns
un-normalized noise value, possibly outside the range [-1, 1]
See also
AiPerlin4

◆ AiVNoise2()

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.

Parameters
p2D point where the noise is evaluated
octavesnumber of octaves
distortionamount of distortion applied to point p before evaluating the noise
lacunarityhow wide apart successive octaves are
Returns
un-normalized vector noise value, possibly outside the range [-1, 1]^2
See also
AiVNoise3

◆ AiVNoise3()

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.

Parameters
p3D point where the noise is evaluated
octavesnumber of octaves
distortionamount of distortion applied to point p before evaluating the noise
lacunarityhow wide apart successive octaves are
Returns
un-normalized vector noise value, possibly outside the range [-1, 1]^3
See also
AiNoise3

◆ AiVNoise4()

AI_API AI_DEVICE AI_CONST AtVector AiVNoise4 ( AtVector  p,
float  time,
int  octaves,
float  distortion,
float  lacunarity 
)

Four-dimensional fractal vector noise function.

Parameters
pfirst three components of the 4D point where the noise is evaluated, usually the "spatial" components
timefourth component of the 4D point, usually the "time" component
octavesnumber of octaves
distortionamount of distortion applied to point p before evaluating the noise
lacunarityhow wide apart successive octaves are
Returns
un-normalized vector noise value, possibly outside the range [-1, 1]^3
See also
AiNoise4

◆ AiCellular()

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.

Note
This implementation is heavily based on Steve Worley's original code. A detailed description and application examples can be found in the 1996 SIGGRAPH paper "A Cellular Texture Basis Function" and especially in the 2002 book "Texturing and Modeling, a Procedural Approach, 3rd edition." There is also extra information on the web site http://www.worley.com/cellular.html.
Parameters
p3D point where the cellular field is evaluated
nnumber of closest points to be simultaneously returned in F, up to a maximum of 5
octavesnumber of stacked up scales of cellular noise
lacunarityhow wide apart successive octaves are (a good default value is 1.92)
randomnessa 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]Fif 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]deltaif 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]IDif 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

◆ AiCellNoise2()

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.

Parameters
p2D point where the noise is evaluated
Returns
a value in the range [0, 1)
See also
AiCellNoise3

◆ AiCellNoise3()

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.

Parameters
p3D point where the noise is evaluated
Returns
a value in the range [0, 1)

◆ AiCellNoise4()

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.

Parameters
p3D point where the noise is evaluated
ttime value where the noise is evaluated
Returns
a value in the range [0, 1)
See also
AiCellNoise3

◆ AiVCellNoise2()

AI_API AI_DEVICE AI_CONST AtVector2 AiVCellNoise2 ( AtVector2  p)

Two-dimensional vector cell noise function.

This function returns a 2D deterministic random value inside each integer lattice cell.

Parameters
p2D point where the noise is evaluated
Returns
a 2D vector with each component in the range [0, 1)
See also
AiVCellNoise3

◆ AiVCellNoise3()

AI_API AI_DEVICE AI_CONST AtVector AiVCellNoise3 ( AtVector  p)

Three-dimensional vector cell noise function.

This function returns a 3D deterministic random value inside each integer lattice cell.

Parameters
p3D point where the noise is evaluated
Returns
a 3D vector with each component in the range [0, 1)

◆ AiVCellNoise4()

AI_API AI_DEVICE AI_CONST AtVector AiVCellNoise4 ( AtVector  p,
float  t 
)

Four-dimensional vector cell noise function.

This function returns a 3D deterministic random value inside each integer lattice cell.

Parameters
p3D point where the noise is evaluated
ttime value where the noise is evaluated
Returns
a 3D vector with each component in the range [0, 1)
See also
AiVCellNoise3

© 2023 Autodesk, Inc. · All rights reserved · www.arnoldrenderer.com