Catlike Coding
Unity Code Documentation
Static Public Member Functions | List of all members
CatlikeCoding.Noise.ValueNoise Class Reference

A collection of methods to sample Value Noise. More...

Static Public Member Functions

static float Sample2D (Vector2 point, float frequency)
 Sample 2D Value noise. More...
 
static float Sample2D (Vector2 point, float frequency, int octaves, float lacunarity, float persistence)
 Sample multi-frequency 2D Value noise. More...
 
static float Sample2DTiledX (Vector2 point, int xOffset, int frequency)
 Sample 2D Value noise, tiled in the X dimension. More...
 
static float Sample2DTiledX (Vector2 point, Vector2 offset, int frequency, int octaves, int lacunarity, float persistence)
 Sample multi-frequency 2D Value noise, tiled in the X dimension. More...
 
static float Sample2DTiledXY (Vector2 point, int xOffset, int yOffset, int frequency)
 Sample 2D Value noise, tiled in both dimensions. More...
 
static float Sample2DTiledXY (Vector2 point, Vector2 offset, int frequency, int octaves, int lacunarity, float persistence)
 Sample multi-frequency 2D Value noise, tiled in both dimensions. More...
 
static float Sample3D (Vector3 point, float frequency)
 Sample 3D Value noise. More...
 
static float Sample3D (Vector3 point, float frequency, int octaves, float lacunarity, float persistence)
 Sample multi-frequency 3D Value noise. More...
 
static float Sample3DTiledX (Vector3 point, int xOffset, int frequency)
 Sample 3D Value noise, tiled in the X dimension. More...
 
static float Sample3DTiledX (Vector3 point, Vector3 offset, int frequency, int octaves, int lacunarity, float persistence)
 Sample multi-frequency 3D Value noise, tiled in the X dimension. More...
 
static float Sample3DTiledXY (Vector3 point, int xOffset, int yOffset, int frequency)
 Sample 3D Value noise, tiled in the X and Y dimensions. More...
 
static float Sample3DTiledXY (Vector3 point, Vector3 offset, int frequency, int octaves, int lacunarity, float persistence)
 Sample multi-frequency 3D Value noise, tiled in the X and Y dimensions. More...
 
static float Sample3DTiledXYZ (Vector3 point, int xOffset, int zOffset, int yOffset, int frequency)
 Sample 3D Value noise, tiled in all three dimensions. More...
 
static float Sample3DTiledXYZ (Vector3 point, Vector3 offset, int frequency, int octaves, int lacunarity, float persistence)
 Sample multi-frequency 3D Value noise, tiled in all three dimensions. More...
 

Detailed Description

A collection of methods to sample Value Noise.

All noise methods instead produce values from 0 to 1.

Tiled versions have offsets used for moving the tiling area to another spot in the noise domain. For the tiling dimensions, the integer parts are used to offset the cells, while the fractional parts are used to offset sampling within the tile. Animating these offsets will result in popping when they cross integer boundaries as the sampling switches to another tile. Frequency and lacunarity are integers for the tiled versions because they must be aligned with cell boundaries.

Member Function Documentation

static float CatlikeCoding.Noise.ValueNoise.Sample2D ( Vector2  point,
float  frequency 
)
static

Sample 2D Value noise.

Returns
The noise value.
Parameters
pointSample point in 2D.
frequencyFrequency of the noise.
static float CatlikeCoding.Noise.ValueNoise.Sample2D ( Vector2  point,
float  frequency,
int  octaves,
float  lacunarity,
float  persistence 
)
static

Sample multi-frequency 2D Value noise.

Returns
The noise value.
Parameters
pointSample point in 2D.
frequencyBase frequency.
octavesAmount of octaves.
lacunarityFrequency multiplier for successive octaves.
persistenceAmplitude multiplier for succesive octaves.
static float CatlikeCoding.Noise.ValueNoise.Sample2DTiledX ( Vector2  point,
int  xOffset,
int  frequency 
)
static

Sample 2D Value noise, tiled in the X dimension.

Returns
The noise value.
Parameters
pointSample point in 2D.
xOffsetX offset of the tiling domain.
frequencyFrequency of the noise.
static float CatlikeCoding.Noise.ValueNoise.Sample2DTiledX ( Vector2  point,
Vector2  offset,
int  frequency,
int  octaves,
int  lacunarity,
float  persistence 
)
static

Sample multi-frequency 2D Value noise, tiled in the X dimension.

Returns
The noise value.
Parameters
pointSample point in 2D.
offsetOffset of the tiling domain.
frequencyBase frequency.
octavesAmount of octaves.
lacunarityFrequency multiplier for successive octaves.
persistenceAmplitude multiplier for succesive octaves.
static float CatlikeCoding.Noise.ValueNoise.Sample2DTiledXY ( Vector2  point,
int  xOffset,
int  yOffset,
int  frequency 
)
static

Sample 2D Value noise, tiled in both dimensions.

Returns
The noise value.
Parameters
pointSample point in 2D.
xOffsetX offset of the tiling domain.
yOffsetY offset of the tiling domain.
frequencyFrequency of the noise.
static float CatlikeCoding.Noise.ValueNoise.Sample2DTiledXY ( Vector2  point,
Vector2  offset,
int  frequency,
int  octaves,
int  lacunarity,
float  persistence 
)
static

Sample multi-frequency 2D Value noise, tiled in both dimensions.

Returns
The noise value.
Parameters
pointSample point in 2D.
offsetOffset of the tiling domain.
frequencyBase frequency.
octavesAmount of octaves.
lacunarityFrequency multiplier for successive octaves.
persistenceAmplitude multiplier for succesive octaves.
static float CatlikeCoding.Noise.ValueNoise.Sample3D ( Vector3  point,
float  frequency 
)
static

Sample 3D Value noise.

Returns
The noise value.
Parameters
pointSample point in 3D.
frequencyFrequency of the noise.
static float CatlikeCoding.Noise.ValueNoise.Sample3D ( Vector3  point,
float  frequency,
int  octaves,
float  lacunarity,
float  persistence 
)
static

Sample multi-frequency 3D Value noise.

Returns
The noise value.
Parameters
pointSample point in 3D.
frequencyBase frequency.
octavesAmount of octaves.
lacunarityFrequency multiplier for successive octaves.
persistenceAmplitude multiplier for succesive octaves.
static float CatlikeCoding.Noise.ValueNoise.Sample3DTiledX ( Vector3  point,
int  xOffset,
int  frequency 
)
static

Sample 3D Value noise, tiled in the X dimension.

Returns
The noise value.
Parameters
pointSample point in 3D.
xOffsetX offset of the tiling domain.
frequencyFrequency of the noise.
static float CatlikeCoding.Noise.ValueNoise.Sample3DTiledX ( Vector3  point,
Vector3  offset,
int  frequency,
int  octaves,
int  lacunarity,
float  persistence 
)
static

Sample multi-frequency 3D Value noise, tiled in the X dimension.

Returns
The noise value.
Parameters
pointSample point in 3D.
offsetOffset of the tiling domain.
frequencyBase frequency.
octavesAmount of octaves.
lacunarityFrequency multiplier for successive octaves.
persistenceAmplitude multiplier for succesive octaves.
static float CatlikeCoding.Noise.ValueNoise.Sample3DTiledXY ( Vector3  point,
int  xOffset,
int  yOffset,
int  frequency 
)
static

Sample 3D Value noise, tiled in the X and Y dimensions.

Returns
The noise value.
Parameters
pointSample point in 3D.
xOffsetX offset of the tiling domain.
yOffsetY offset of the tiling domain.
frequencyFrequency of the noise.
static float CatlikeCoding.Noise.ValueNoise.Sample3DTiledXY ( Vector3  point,
Vector3  offset,
int  frequency,
int  octaves,
int  lacunarity,
float  persistence 
)
static

Sample multi-frequency 3D Value noise, tiled in the X and Y dimensions.

Returns
The noise value.
Parameters
pointSample point in 3D.
offsetOffset of the tiling domain.
frequencyBase frequency.
octavesAmount of octaves.
lacunarityFrequency multiplier for successive octaves.
persistenceAmplitude multiplier for succesive octaves.
static float CatlikeCoding.Noise.ValueNoise.Sample3DTiledXYZ ( Vector3  point,
int  xOffset,
int  zOffset,
int  yOffset,
int  frequency 
)
static

Sample 3D Value noise, tiled in all three dimensions.

Returns
The noise value.
Parameters
pointSample point in 3D.
xOffsetX offset of the tiling domain.
yOffsetY offset of the tiling domain.
zOffsetZ offset of the tiling domain.
frequencyFrequency of the noise.
static float CatlikeCoding.Noise.ValueNoise.Sample3DTiledXYZ ( Vector3  point,
Vector3  offset,
int  frequency,
int  octaves,
int  lacunarity,
float  persistence 
)
static

Sample multi-frequency 3D Value noise, tiled in all three dimensions.

Returns
The noise value.
Parameters
pointSample point in 3D.
offsetOffset of the tiling domain.
frequencyBase frequency.
octavesAmount of octaves.
lacunarityFrequency multiplier for successive octaves.
persistenceAmplitude multiplier for succesive octaves.