Noise
Coordinate-noise and CPU-image generation interface.
Use an implementation such as FastNoiseLite; Noise is not a concrete ready-to-use generator. Numeric samples, grayscale Images and GPU textures are different data. For a heightfield, define coordinates and value scale first; L8 is not the original float data.
Base Image methods sample an integer grid from zero. Normalize stretches one image or the entire requested volume; this can change contrast between separately generated neighboring chunks. For a continuous world, supply consistent coordinates and a common value mapping.
Seamless blending targets repeating images, not arbitrary world stitching. FastNoiseLite 1.0.0 has reproduced GetNoise1D/Offset.x and seamless depth=1 limitations, documented on those methods. CPU samples/bytes/dimensions were tested; visual seams, GPU behavior and large requests were not accepted.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Methods9
GetImageImage
public Image GetImage(int width, int height, bool invert = false, bool in3DSpace = false, bool normalize = true);Synchronously creates a CPU Image. The base implementation and FastNoiseLite sample integer x/y from 0 and return L8 without mipmaps. in3DSpace=true takes the z=0 slice; false uses 2D. normalize=true stretches this image min/max to 0..255; a constant field becomes black. false maps −1..1 to 0..255 with clipping and precision loss. invert replaces each byte with 255−byte. Creates no GPU texture and saves no file.
| Name | Type | Default |
|---|---|---|
width | int | — |
height | int | — |
invert | bool | false |
in3DSpace | bool | false |
normalize | bool | true |
widthPositive image width; bound it for CPU time and memory.
heightPositive image height, not world dimensions.
invertInverts brightness after byte mapping; changes neither seed nor generator samples.
in3DSpacetrue samples 3D at z=0; false samples 2D. Implementation Offset applies.
normalizetrue stretches min/max of the entire requested field; false uses fixed mapping with clipping.
ImageNew owned CPU Image, or null with diagnostics for invalid conditions.
GetImage3DReckfell.Collections.Array<Image>
public Reckfell.Collections.Array<Image> GetImage3D(int width, int height, int depth, bool invert = false, bool normalize = true);Creates a typed Array<Image> of CPU slices z=0..depth−1, not ImageTexture3D. The base implementation/FastNoiseLite produces L8 without mipmaps; normalize=true uses one min/max across the ENTIRE requested volume. Separately normalized chunks can have different brightness scales; use a shared mapping for consistent numeric heightfields. Dispose owned Images after use; typed Array has no Dispose method.
| Name | Type | Default |
|---|---|---|
width | int | — |
height | int | — |
depth | int | — |
invert | bool | false |
normalize | bool | true |
widthPositive image width; bound it for CPU time and memory.
heightPositive image height, not world dimensions.
depthPositive Z-slice count; for seamless depth=1 in 1.0.0 check the extra-layer limitation.
invertInverts brightness after byte mapping; changes neither seed nor generator samples.
normalizetrue stretches min/max of the entire requested field; false uses fixed mapping with clipping.
Reckfell.Collections.Array<Image>Typed Array<Image> of CPU layers; dispose owned Images and check actual Count.
GetNoise1Dfloat
public float GetNoise1D(float x);Returns a numeric sample from the Noise implementation. FastNoiseLite 1.0.0 uses a 2D slice with extra preprocessing: Offset.x is applied twice with warp disabled. Use GetNoise2D(x, 0) for a single-offset slice. Range depends on the algorithm; not necessarily 0..1.
| Name | Type | Default |
|---|---|---|
x | float | — |
xFinite input-field X coordinate; implementation/Frequency supplies scale.
floatNumeric algorithm sample, not a guaranteed probability or normalized height.
GetNoise2Dfloat
public float GetNoise2D(float x, float y);Samples noise at x/y coordinates rather than indexing a finished Image. FastNoiseLite applies Offset.X/Y, warp and Frequency. Use consistent global coordinates for adjacent terrain chunks instead of restarting each at zero. Does not guarantee a universal [−1,1] range.
| Name | Type | Default |
|---|---|---|
x | float | — |
y | float | — |
xFinite input-field X coordinate; implementation/Frequency supplies scale.
yFinite Y coordinate in the same field.
floatNumeric algorithm sample, not a guaranteed probability or normalized height.
GetNoise2Dvfloat
public float GetNoise2Dv(Vector2 v);Vector form of GetNoise2D(v.X, v.Y), with the same settings and range. Does not automatically transform Entity coordinates.
| Name | Type | Default |
|---|---|---|
v | Vector2 | — |
vFinite input-field coordinates in Vector2/Vector3.
floatNumeric algorithm sample, not a guaranteed probability or normalized height.
GetNoise3Dfloat
public float GetNoise3D(float x, float y, float z);Samples volumetric x/y/z noise, not independent 2D maps: changing z selects another slice of the same field. FastNoiseLite applies all three Offset components and 3D warp. Coordinates can be varied for animation, but the API does not automatically consume elapsed seconds.
| Name | Type | Default |
|---|---|---|
x | float | — |
y | float | — |
z | float | — |
xFinite input-field X coordinate; implementation/Frequency supplies scale.
yFinite Y coordinate in the same field.
zFinite volumetric-field Z coordinate.
floatNumeric algorithm sample, not a guaranteed probability or normalized height.
GetNoise3Dvfloat
public float GetNoise3Dv(Vector3 v);Vector form of GetNoise3D(v.X, v.Y, v.Z), not a pixel or voxel lookup in a finished resource.
| Name | Type | Default |
|---|---|---|
v | Vector3 | — |
vFinite input-field coordinates in Vector2/Vector3.
floatNumeric algorithm sample, not a guaranteed probability or normalized height.
GetSeamlessImageImage
public Image GetSeamlessImage(int width, int height, bool invert = false, bool in3DSpace = false, float skirt = 0.1f, bool normalize = true);Creates a repeatable CPU image by blending an expanded field. skirt is an extra-field fraction, not pixels: even 0 retains at least one extra pixel. Not the same field as unblended GetImage and not a solution for arbitrary adjacent chunks. Use positive dimensions and a sensible finite skirt; negatives are rejected. Dimensions/format were tested, but visual seam quality and extreme skirts were not accepted.
| Name | Type | Default |
|---|---|---|
width | int | — |
height | int | — |
invert | bool | false |
in3DSpace | bool | false |
skirt | float | 0.1f |
normalize | bool | true |
widthPositive image width; bound it for CPU time and memory.
heightPositive image height, not world dimensions.
invertInverts brightness after byte mapping; changes neither seed nor generator samples.
in3DSpacetrue samples 3D at z=0; false samples 2D. Implementation Offset applies.
skirtSensible finite nonnegative extra-field fraction, default 0.1, not pixels. Large values increase work and were not accepted.
normalizetrue stretches min/max of the entire requested field; false uses fixed mapping with clipping.
ImageNew owned CPU Image, or null with diagnostics for invalid conditions.
GetSeamlessImage3DReckfell.Collections.Array<Image>
public Reckfell.Collections.Array<Image> GetSeamlessImage3D(int width, int height, int depth, bool invert = false, float skirt = 0.1f, bool normalize = true);Creates CPU slices blended across three axes. In 1.0.0 depth=1 retains an extra skirt layer: check Count; for one 3D slice use GetSeamlessImage(..., in3DSpace:true) when X/Y seamlessness suffices. A depth=4 volume was tested; do not assume every size/skirt combination is valid. normalize applies to the expanded field. Creates no GPU volume and proves no absence of visible seams.
| Name | Type | Default |
|---|---|---|
width | int | — |
height | int | — |
depth | int | — |
invert | bool | false |
skirt | float | 0.1f |
normalize | bool | true |
widthPositive image width; bound it for CPU time and memory.
heightPositive image height, not world dimensions.
depthPositive Z-slice count; for seamless depth=1 in 1.0.0 check the extra-layer limitation.
invertInverts brightness after byte mapping; changes neither seed nor generator samples.
skirtSensible finite nonnegative extra-field fraction, default 0.1, not pixels. Large values increase work and were not accepted.
normalizetrue stretches min/max of the entire requested field; false uses fixed mapping with clipping.
Reckfell.Collections.Array<Image>Typed Array<Image> of CPU layers; dispose owned Images and check actual Count.