reckfellENGINE

FastNoise2

Wrapper for the FastNoise2(https://github.com/Auburn/FastNoise2) library.

On this page
class FastNoise2ReckfellSharpInherits Resource

Wrapper for the FastNoise2(https://github.com/Auburn/FastNoise2) library.

Generates coherent noise with support for SIMD processing, which can speed up generation significantly compared to scalar implementations like FastNoiseLite. It uses a node-based structure internally for configuration, which is however not editable from within Reckfell at the moment. Instead, simplified properties are exposed. It possible to edit noise graphs with an external Noise Tool, which can export an encoded node tree as a base64 string. The current integration uses FastNoise2 version 0.10.0-alpha. If you use encoded node trees made with the Noise Tool, it must match that version. After changing properties, you must call FastNoise2.UpdateGenerator for the internal graph to be rebuilt and changes to take effect.

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Constructors1

FastNoise2Constructor
# FastNoise2
C#
public FastNoise2();

Properties22

CellularDistanceFunctionProperty
# CellularDistanceFunction
C#
public FastNoise2.CellularDistanceFunctionEnum CellularDistanceFunction { get; set; }
CellularIndex0Property
# CellularIndex0
C#
public int CellularIndex0 { get; set; }

N-th closest cell used in cellular distance or value calculations.

CellularIndex1Property
# CellularIndex1
C#
public int CellularIndex1 { get; set; }

N-th closest cell used as second component in some cellular distance calculations.

CellularJitterProperty
# CellularJitter
C#
public float CellularJitter { get; set; }
CellularReturnTypeProperty
# CellularReturnType
C#
public FastNoise2.CellularReturnTypeEnum CellularReturnType { get; set; }
EncodedNodeTreeProperty
# EncodedNodeTree
C#
public string EncodedNodeTree { get; set; }
FractalGainProperty
# FractalGain
C#
public float FractalGain { get; set; }
FractalLacunarityProperty
# FractalLacunarity
C#
public float FractalLacunarity { get; set; }
FractalOctavesProperty
# FractalOctaves
C#
public int FractalOctaves { get; set; }
FractalPingPongStrengthProperty
# FractalPingPongStrength
C#
public float FractalPingPongStrength { get; set; }
FractalTypeProperty
# FractalType
C#
public FastNoise2.FractalTypeEnum FractalType { get; set; }
NoiseTypeProperty
# NoiseType
C#
public FastNoise2.NoiseTypeEnum NoiseType { get; set; }
PeriodProperty
# Period
C#
public float Period { get; set; }
RemapEnabledProperty
# RemapEnabled
C#
public bool RemapEnabled { get; set; }
RemapInputMaxProperty
# RemapInputMax
C#
public float RemapInputMax { get; set; }
RemapInputMinProperty
# RemapInputMin
C#
public float RemapInputMin { get; set; }
RemapOutputMaxProperty
# RemapOutputMax
C#
public float RemapOutputMax { get; set; }
RemapOutputMinProperty
# RemapOutputMin
C#
public float RemapOutputMin { get; set; }
SeedProperty
# Seed
C#
public int Seed { get; set; }
TerraceEnabledProperty
# TerraceEnabled
C#
public bool TerraceEnabled { get; set; }
TerraceMultiplierProperty
# TerraceMultiplier
C#
public float TerraceMultiplier { get; set; }
TerraceSmoothnessProperty
# TerraceSmoothness
C#
public float TerraceSmoothness { get; set; }

Methods50

GenerateImagevoid
# GenerateImage
C#
public void GenerateImage(Image image, bool tileable);

Fills a greyscale image with noise values.

Parameters
NameTypeDefault
imageImage—
tileablebool—
GetCellularDistanceFunctionFastNoise2.CellularDistanceFunctionEnum
# GetCellularDistanceFunction
C#
public FastNoise2.CellularDistanceFunctionEnum GetCellularDistanceFunction();
Returns FastNoise2.CellularDistanceFunctionEnum
GetCellularIndex0int
# GetCellularIndex0
C#
public int GetCellularIndex0();
Returns int
GetCellularIndex1int
# GetCellularIndex1
C#
public int GetCellularIndex1();
Returns int
GetCellularJitterfloat
# GetCellularJitter
C#
public float GetCellularJitter();
Returns float
GetCellularReturnTypeFastNoise2.CellularReturnTypeEnum
# GetCellularReturnType
C#
public FastNoise2.CellularReturnTypeEnum GetCellularReturnType();
Returns FastNoise2.CellularReturnTypeEnum
GetEncodedNodeTreestring
# GetEncodedNodeTree
C#
public string GetEncodedNodeTree();
Returns string
GetFractalGainfloat
# GetFractalGain
C#
public float GetFractalGain();
Returns float
GetFractalLacunarityfloat
# GetFractalLacunarity
C#
public float GetFractalLacunarity();
Returns float
GetFractalOctavesint
# GetFractalOctaves
C#
public int GetFractalOctaves();
Returns int
GetFractalPingPongStrengthfloat
# GetFractalPingPongStrength
C#
public float GetFractalPingPongStrength();
Returns float
GetFractalTypeFastNoise2.FractalTypeEnum
# GetFractalType
C#
public FastNoise2.FractalTypeEnum GetFractalType();
Returns FastNoise2.FractalTypeEnum
GetNoise2DSinglefloat
# GetNoise2DSingle
C#
public float GetNoise2DSingle(Vector2 pos);

Generates a single value of 2D noise. Note that generating values one by one will not benefit from SIMD performance as much as generating multiple values at once.

Parameters
NameTypeDefault
posVector2—
Returns float
GetNoise3DSinglefloat
# GetNoise3DSingle
C#
public float GetNoise3DSingle(Vector3 pos);

Generates a single value of 3D noise. Note that generating values one by one will not benefit from SIMD performance as much as generating multiple values at once.

Parameters
NameTypeDefault
posVector3—
Returns float
GetNoiseTypeFastNoise2.NoiseTypeEnum
# GetNoiseType
C#
public FastNoise2.NoiseTypeEnum GetNoiseType();
Returns FastNoise2.NoiseTypeEnum
GetPeriodfloat
# GetPeriod
C#
public float GetPeriod();
Returns float
GetRemapInputMaxfloat
# GetRemapInputMax
C#
public float GetRemapInputMax();
Returns float
GetRemapInputMinfloat
# GetRemapInputMin
C#
public float GetRemapInputMin();
Returns float
GetRemapOutputMaxfloat
# GetRemapOutputMax
C#
public float GetRemapOutputMax();
Returns float
GetRemapOutputMinfloat
# GetRemapOutputMin
C#
public float GetRemapOutputMin();
Returns float
GetSeedint
# GetSeed
C#
public int GetSeed();
Returns int
GetSimdLevelFastNoise2.SimdLevel
# GetSimdLevel
C#
public FastNoise2.SimdLevel GetSimdLevel();

Gets which SIMD level was detected by the library. This gives an indication of performance on the current CPU, as different models can have different SIMD instructions available.

Returns FastNoise2.SimdLevel
GetSimdLevelNamestring
# GetSimdLevelName
C#
public static string GetSimdLevelName(FastNoise2.SimdLevel level);

Gets the name of SIMD level.

Parameters
NameTypeDefault
levelFastNoise2.SimdLevel—
Returns string
GetTerraceMultiplierfloat
# GetTerraceMultiplier
C#
public float GetTerraceMultiplier();
Returns float
GetTerraceSmoothnessfloat
# GetTerraceSmoothness
C#
public float GetTerraceSmoothness();
Returns float
IsRemapEnabledbool
# IsRemapEnabled
C#
public bool IsRemapEnabled();
Returns bool
IsTerraceEnabledbool
# IsTerraceEnabled
C#
public bool IsTerraceEnabled();
Returns bool
SetCellularDistanceFunctionvoid
# SetCellularDistanceFunction
C#
public void SetCellularDistanceFunction(FastNoise2.CellularDistanceFunctionEnum cellDistanceFunc);
Parameters
NameTypeDefault
cellDistanceFuncFastNoise2.CellularDistanceFunctionEnum—
SetCellularIndex0void
# SetCellularIndex0
C#
public void SetCellularIndex0(int i);
Parameters
NameTypeDefault
iint—
SetCellularIndex1void
# SetCellularIndex1
C#
public void SetCellularIndex1(int i);
Parameters
NameTypeDefault
iint—
SetCellularJittervoid
# SetCellularJitter
C#
public void SetCellularJitter(float returnType);
Parameters
NameTypeDefault
returnTypefloat—
SetCellularReturnTypevoid
# SetCellularReturnType
C#
public void SetCellularReturnType(FastNoise2.CellularReturnTypeEnum returnType);
Parameters
NameTypeDefault
returnTypeFastNoise2.CellularReturnTypeEnum—
SetEncodedNodeTreevoid
# SetEncodedNodeTree
C#
public void SetEncodedNodeTree(string code);
Parameters
NameTypeDefault
codestring—
SetFractalGainvoid
# SetFractalGain
C#
public void SetFractalGain(float gain);
Parameters
NameTypeDefault
gainfloat—
SetFractalLacunarityvoid
# SetFractalLacunarity
C#
public void SetFractalLacunarity(float lacunarity);
Parameters
NameTypeDefault
lacunarityfloat—
SetFractalOctavesvoid
# SetFractalOctaves
C#
public void SetFractalOctaves(int octaves);
Parameters
NameTypeDefault
octavesint—
SetFractalPingPongStrengthvoid
# SetFractalPingPongStrength
C#
public void SetFractalPingPongStrength(float strength);
Parameters
NameTypeDefault
strengthfloat—
SetFractalTypevoid
# SetFractalType
C#
public void SetFractalType(FastNoise2.FractalTypeEnum type);
Parameters
NameTypeDefault
typeFastNoise2.FractalTypeEnum—
SetNoiseTypevoid
# SetNoiseType
C#
public void SetNoiseType(FastNoise2.NoiseTypeEnum type);
Parameters
NameTypeDefault
typeFastNoise2.NoiseTypeEnum—
SetPeriodvoid
# SetPeriod
C#
public void SetPeriod(float period);
Parameters
NameTypeDefault
periodfloat—
SetRemapEnabledvoid
# SetRemapEnabled
C#
public void SetRemapEnabled(bool enabled);
Parameters
NameTypeDefault
enabledbool—
SetRemapInputMaxvoid
# SetRemapInputMax
C#
public void SetRemapInputMax(float maxValue);
Parameters
NameTypeDefault
maxValuefloat—
SetRemapInputMinvoid
# SetRemapInputMin
C#
public void SetRemapInputMin(float minValue);
Parameters
NameTypeDefault
minValuefloat—
SetRemapOutputMaxvoid
# SetRemapOutputMax
C#
public void SetRemapOutputMax(float maxValue);
Parameters
NameTypeDefault
maxValuefloat—
SetRemapOutputMinvoid
# SetRemapOutputMin
C#
public void SetRemapOutputMin(float minValue);
Parameters
NameTypeDefault
minValuefloat—
SetSeedvoid
# SetSeed
C#
public void SetSeed(int seed);
Parameters
NameTypeDefault
seedint—
SetTerraceEnabledvoid
# SetTerraceEnabled
C#
public void SetTerraceEnabled(bool enabled);
Parameters
NameTypeDefault
enabledbool—
SetTerraceMultipliervoid
# SetTerraceMultiplier
C#
public void SetTerraceMultiplier(float multiplier);
Parameters
NameTypeDefault
multiplierfloat—
SetTerraceSmoothnessvoid
# SetTerraceSmoothness
C#
public void SetTerraceSmoothness(float smoothness);
Parameters
NameTypeDefault
smoothnessfloat—
UpdateGeneratorvoid
# UpdateGenerator
C#
public void UpdateGenerator();

This method must be called after you change properties, so they can take effect.

FastNoise2.CellularDistanceFunctionEnum

FastNoise2.CellularReturnTypeEnum

FastNoise2.FractalTypeEnum

FastNoise2.NoiseTypeEnum

FastNoise2.SimdLevel

ValueDescription
Avx = 128

x86 CPU Processing 8 floats in one instruction.

Avx2 = 256

x86 CPU Processing 8 floats in one instruction, with more instructions supported than AVX.

Avx512 = 512

x86 CPU Processing 16 floats in one instruction.

Neon = 65536

ARM CPU processing 4 floats in one instruction.

Null = 0

Undefined level.

Scalar = 1

Single numbers. Slowest level.

Sse = 2

x86 CPU processing 4 floats in one instruction.

Sse2 = 4

x86 CPU Processing 4 floats in one instruction, with more instructions supported than SSE.

Sse3 = 8

x86 CPU Processing 4 floats in one instruction, with more instructions supported than SSE3.

Sse41 = 32

x86 CPU Processing 4 floats in one instruction, with more instructions supported than SSE41.

Sse42 = 64

x86 CPU Processing 4 floats in one instruction, with more instructions supported than SSE42.

Ssse3 = 16

x86 CPU Processing 4 floats in one instruction, with more instructions supported than SSE4.

Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.