Zn_SpotNoise
Specialization of cellular noise intented for cheap "ore patch" generation or deterministic point scattering.
Specialization of cellular noise intented for cheap "ore patch" generation or deterministic point scattering.
Divides space into a grid where each cell contains a circular "spot". Noise evaluation returns 1 when the position is inside a spot, 0 otherwise.
Limitation: high jitter can make spots clip with cell borders. This is expected. If you need higher quality (but slower) results, you may use another noise library such as FastNoiseLite.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Constructors1
Zn_SpotNoiseConstructor
public Zn_SpotNoise();Properties4
CellSizeProperty
public float CellSize { get; set; }JitterProperty
public float Jitter { get; set; }SeedProperty
public int Seed { get; set; }SpotRadiusProperty
public float SpotRadius { get; set; }Methods14
GetCellSizefloat
public float GetCellSize();Returns
floatGetJitterfloat
public float GetJitter();Returns
floatGetNoise2Dfloat
public float GetNoise2D(float x, float y);| Name | Type | Default |
|---|---|---|
x | float | — |
y | float | — |
Returns
floatGetNoise2Dvfloat
public float GetNoise2Dv(Vector2 pos);| Name | Type | Default |
|---|---|---|
pos | Vector2 | — |
Returns
floatGetNoise3Dfloat
public float GetNoise3D(float x, float y, float z);| Name | Type | Default |
|---|---|---|
x | float | — |
y | float | — |
z | float | — |
Returns
floatGetNoise3Dvfloat
public float GetNoise3Dv(Vector3 pos);| Name | Type | Default |
|---|---|---|
pos | Vector3 | — |
Returns
floatGetSeedint
public int GetSeed();Returns
intGetSpotPositionsInArea2DVector2[]
public Vector2[] GetSpotPositionsInArea2D(Rect2 rect);| Name | Type | Default |
|---|---|---|
rect | Rect2 | — |
Returns
Vector2[]GetSpotPositionsInArea3DVector3[]
public Vector3[] GetSpotPositionsInArea3D(Aabb aabb);| Name | Type | Default |
|---|---|---|
aabb | Aabb | — |
Returns
Vector3[]GetSpotRadiusfloat
public float GetSpotRadius();Returns
floatSetCellSizevoid
public void SetCellSize(float cellSize);| Name | Type | Default |
|---|---|---|
cellSize | float | — |
SetJittervoid
public void SetJitter(float jitter);| Name | Type | Default |
|---|---|---|
jitter | float | — |
SetSeedvoid
public void SetSeed(int seed);| Name | Type | Default |
|---|---|---|
seed | int | — |
SetSpotRadiusvoid
public void SetSpotRadius(float radius);| Name | Type | Default |
|---|---|---|
radius | float | — |
Reckfell Engine documentationBack to top ↑