s&box docs
API ReferenceSandbox.Utility

public static abstract sealed class Sandbox.Utility.Noise

Provides access to coherent noise utilities. All of these functions should return between 0 and 1.

Methods

Showing 9 methods

public static float Fbm(int octaves, float x, float y = 0, float z = 0)

Fractional Brownian Motion noise, a.k.a. Fractal Perlin noise. For a thread-safe alternative with more options, use `Sandbox.Utility.Noise.PerlinField(Sandbox.Utility.Noise.Parameters)` with `Sandbox.Utility.Noise.FractalParameters`.

Parameters

  • octaves: Number of octaves for the noise. Higher values are slower but produce more detailed results. 3 is a good starting point.
  • x: Input on the X axis.
  • y: Input on the Y axis. Default: 0
  • z: Input on the Z axis. Default: 0

Returns

Resulting noise at given coordinates, in range of 0 to 1.

public static Vector3 FbmVector(int octaves, float x, float y = 0)

Fractional Brownian Motion noise, a.k.a. Fractal Perlin noise.

Parameters

  • octaves: Number of octaves for the noise. Higher values are slower but produce more detailed results. 3 is a good starting point.
  • x: Input on the X axis.
  • y: Input on the Y axis. Default: 0

public static Sandbox.Utility.INoiseField PerlinField(Sandbox.Utility.Noise.Parameters parameters)

Creates a Perlin noise field, which smoothly samples a grid of random gradients. Use a `Sandbox.Utility.Noise.FractalParameters` for the field to have multiple octaves.

public static Sandbox.Utility.INoiseField SimplexField(Sandbox.Utility.Noise.Parameters parameters)

Creates a Simplex noise field, a cheaper gradient noise function similar to `Sandbox.Utility.Noise.PerlinField(Sandbox.Utility.Noise.Parameters)`. Use a `Sandbox.Utility.Noise.FractalParameters` for the field to have multiple octaves.

public static Sandbox.Utility.INoiseField ValueField(Sandbox.Utility.Noise.Parameters parameters)

Creates a Value noise field, effectively smoothly sampled white noise. Use a `Sandbox.Utility.Noise.FractalParameters` for the field to have multiple octaves.

Metadata

FieldValue
NamespaceSandbox.Utility
Typeclass
AssemblySandbox.System
Doc IDT:Sandbox.Utility.Noise

On this page