-
Notifications
You must be signed in to change notification settings - Fork 89
Noise Settings
int GetSeed()
Returns seed
void SetSeed(int seed)
Default: 1337
Using different seeds will cause the noise output to change
Used in all noise generation
void SetFrequency(float frequency)
Default: 0.01
Affects how coarse the noise output is
Used in all noise generation except White Noise
void SetNoiseType(NoiseType noiseType)
Default: Simplex
Sets the type of noise returned by GetNoise()
Possible noise types:
- Value
- ValueFractal
- Perlin
- PerlinFractal
- Simplex
- SimplexFractal
- Cellular
- WhiteNoise
- Cubic
- CubicFractal
void SetFractalOctaves(int octaves)
Default: 3
The amount of noise layers used to create the fractal
Used in all fractal noise generation
void SetFractalLacunarity(float lacunarity)
Default: 2.0
The frequency multiplier between each octave
Used in all fractal noise generation
void SetFractalGain(float gain)
Default: 0.5
The relative strength of noise from each layer when compared to the last
Used in all fractal noise generation
void SetFractalType(FractalType fractalType)
Default: FBM
Used in all fractal noise generation
Possible fractal types:
- FBM
- Billow
- RigidMulti
void SetCellularDistanceFunction(CellularDistanceFunction cellularDistanceFunction)
Default: Euclidean
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)
Default: Cell Value
What value does the cellular function return from its calculations
Possible return types:
- CellValue
- Distance
- Distance2
- Distance2Add
- Distance2Sub
- Distance2Mul
- Distance2Div
- NoiseLookup
- Distance2Cave
Only CellValue is bounded between -1.0 and 1.0, all distance return types have a minimum of 0 and varying maximums.
void SetCellularNoiseLookupType(NoiseType cellularNoiseLookupType)
Default: Simplex
Sets the type of noise used if cellular return type is set the NoiseLookup
Possible noise types:
- Value
- ValueFractal
- Perlin
- PerlinFractal
- Simplex
- SimplexFractal
void SetCellularNoiseLookupFrequency(float cellularNoiseLookupFrequency)
Default: 0.2
Sets relative frequency on the cellular noise lookup return type
void SetCellularDistance2Indicies(int cellularDistanceIndex0, int cellularDistanceIndex1)
Default: 0, 1
Sets the 2 distance indicies used for distance2 return types
Note: index0 should be lower than index1
Both indicies must be >= 0, index1 must be < 4
void SetCellularJitter(float cellularJitter)
Default: 0.45
Sets the maximum distance a cellular point can move from its grid position
Note: Setting this high will make cellular grid artifacts more common
void SetPerturbType(PerturbType perturbType)
Default: None
Enabling perturbing affects all noise types, it warps the input coordinates in 3D space before generating noise.
Possible types:
- None
- Gradient
- GradientFractal
- Normalise
- Gradient_Normalise
- GradientFractal_Normalise
The normalise types will normalise the input position then scale it by the value SetPerturbNormaliseLength()
, this is useful for creating height maps for a sphere if you set the normalise length to the radius.
For Gradient{Fractal}_Normalise the gradient perturb step is done first then the result is normalised as explained above.
void SetPerturbAmp(float perturbAmp)
Default: 1.0
Sets the maximum distance the input position can be perturbed.
void SetPerturbFrequency(float perturbFrequency)
Default: 0.5
Sets the frequency of the perturb noise function, this is relative to the normal frequency SetFrequency(float)
void SetPerturbNormaliseLength(float perturbNormaliseLength)
Default: 1.0
Sets the length for vectors after perturb normalising.
void SetPerturbFractalOctaves(int perturbOctaves)
Default: 3
Sets octave count for perturb fractal types
void SetPerturbFractalLacunarity(float perturbLacunarity)
Default: 2.0
Sets octave lacunarity for perturb fractal types
void SetPerturbFractalGain(float perturbGain)
Default: 0.5
Sets octave gain for perturb fractal types