-
-
Notifications
You must be signed in to change notification settings - Fork 327
Home
Welcome to the FastNoise wiki!
All outputs are approximately bounded from -1.0 to 1.0, except for distance functions on cellular noise
int GetSeed()
Returns seed
void SetSeed(int seed)
Used in all noise generation
void SetFrequency(float frequency)
Used in all noise generation except White Noise
void SetInterp(Interp interp)
Used in Value and Gradient Noise
Possible interpolation methods:
- InterpLinear
- InterpHermite
- InterpQuintic
void SetNoiseType(NoiseType noiseType)
Sets the type of noise returned by GetNoise()
Possible noise types:
- Value
- ValueFractal
- Gradient
- GradientFractal
- Simplex
- SimplexFractal
- Cellular
- CellularHQ
- WhiteNoise
void SetFractalOctaves(unsigned int octaves)
Used in all fractal noise generation
void SetFractalLacunarity(float lacunarity)
Used in all fractal noise generation
void SetFractalGain(float gain)
Used in all fractal noise generation
void SetFractalType(FractalType fractalType)
Used in all fractal noise generation
Possible fractal types:
- FBM
- Billow
- RigidMulti
void SetCellularDistanceFunction(CellularDistanceFunction cellularDistanceFunction)
The distance function used to calculate the cell for a given point
Possible distance functions:
- Euclidean
- Manhattan
- Natural
(Natural is a blend of Euclidean and Manhattan to give curved cell boundaries)
void SetCellularReturnType(CellularReturnType cellularReturnType)
What value does the function return from its calculations
Possible return types:
- CellValue
- NoiseLookup
- Distance2Center
- Distance2CenterXValue
- Distance2CenterSq
- Distance2CenterSqXValue
- Distance2Edge
- Distance2EdgeXValue
- Distance2EdgeSq
- Distance2EdgeSqXValue
Distance2 functions return distance from given point to the center/edge of its cell, they are always positive and unbounded
XValue means the output will be multiplied by the cell value
NoiseLookup requires another FastNoise object be set with SetCellularNoiseLookup() to function
void SetCellularNoiseLookup(FastNoise* noise)
Noise used to calculate a cell value if cellular return type is NoiseLookup
The lookup value is acquired through GetNoise() so ensure you SetNoiseType() on the noise lookup, value, gradient or simplex is recommended
float GetNoise(float x, float y{, float z})
Returns the noise type as set by SetNoiseType()
float GetValue(float x, float y{, float z})
float GetValueFractal(float x, float y{, float z})
float GetGradient(float x, float y{, float z})
float GetGradientFractal(float x, float y{, float z})
float GetSimplex(float x, float y{, float z}{, float w})
float GetSimplexFractal(float x, float y{, float z})
float GetCellular(float x, float y{, float z})
float GetCellularHQ(float x, float y{, float z})
float GetWhiteNoise(float x, float y{, float z}{, float w})
float GetWhiteNoiseInt(int x, int y{, int z}{, int w})