Skip to content
Jordan Peck edited this page May 27, 2016 · 12 revisions

Welcome to the FastNoise wiki!

All outputs are approximately bounded from -1.0 to 1.0, except for distance functions on cellular noise

Noise Settings

General

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

Fractal

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

Cellular

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

Noise Generation

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})

Clone this wiki locally