API ReferenceSandbox.Utility

Noiseclass

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

objectNoise
Namespace
Sandbox.Utility
Assembly
Sandbox.System
Declaration
public static abstract sealed class Sandbox.Utility.Noise

Methods9

Showing 9 methods

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

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`.

ParameterTypeDescription
octavesintNumber of octaves for the noise. Higher values are slower but produce more detailed results. 3 is a good starting point.
xfloatInput on the X axis.
y = 0floatInput on the Y axis.
z = 0floatInput on the Z axis.
Returns:floatResulting noise at given coordinates, in range of 0 to 1.

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

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

ParameterTypeDescription
octavesintNumber of octaves for the noise. Higher values are slower but produce more detailed results. 3 is a good starting point.
xfloatInput on the X axis.
y = 0floatInput on the Y axis.
Returns:Vector3

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

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.

ParameterTypeDescription
parametersParameters
Returns:INoiseField

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

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.

ParameterTypeDescription
parametersParameters
Returns:INoiseField

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

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

ParameterTypeDescription
parametersParameters
Returns:INoiseField

On this page