Skip to content

API reference Obsidian.API.Noise

ImprovedNoise class

A single octave of vanilla Perlin noise (ImprovedNoise). Usually used through PerlinNoise.

public sealed class ImprovedNoise

In Obsidian.API.

Constructors

ImprovedNoise(IRandomSource)

public ImprovedNoise(IRandomSource random);

Creates a noise, consuming 3 doubles and 256 bounded ints from random.

Properties

public double Xo { get; }public double Yo { get; }public double Zo { get; }

Methods

Noise(double, double, double)

public double Noise(double x, double y, double z);

Samples the noise at (x, y, z). Result is roughly in [-1, 1].

Noise(double, double, double, double, double)

public double Noise(double x, double y, double z, double yScale, double yMax);

Legacy sampling with vertical "smearing": the y offset inside the cell is quantized to multiples of yScale (bounded by yMax) when computing gradients. Used by BlendedNoise and PerlinNoise.GetValue.

NoiseWithDerivative(double, double, double, Span<double>)

public double NoiseWithDerivative(double x, double y, double z, Span<double> derivatives);

Samples the noise at (x, y, z) and adds its partial derivatives to derivatives (length 3).

On this page