Table of Contents

Class Noise

Abstract base class for noise generators.

Inheritance
Noise
Derived

Remarks

This class defines the interface for noise generation libraries to inherit from.

A default Noise.get_seamless_image implementation is provided for libraries that do not provide seamless noise. This function requests a larger image from the Noise.get_image method, reverses the quadrants of the image, then uses the strips of extra width to blend over the seams.

Inheriting noise classes can optionally override this function to provide a more optimal algorithm.

Methods

get_image(int, int, bool, bool, bool)

Qualifiers: const

Returns an Image containing 2D noise values.

Note: With normalize set to false, the default implementation expects the noise generator to return values in the range -1.0 to 1.0.

Image get_image(int width, int height, bool invert, bool in_3d_space, bool normalize)

Parameters

width int
height int
invert bool
in_3d_space bool
normalize bool

get_image_3d(int, int, int, bool, bool)

Qualifiers: const

Returns an Array of Images containing 3D noise values for use with ImageTexture3D.create.

Note: With normalize set to false, the default implementation expects the noise generator to return values in the range -1.0 to 1.0.

Image[] get_image_3d(int width, int height, int depth, bool invert, bool normalize)

Parameters

width int
height int
depth int
invert bool
normalize bool

get_noise_1d(float)

Qualifiers: const

Returns the 1D noise value at the given (x) coordinate.

float get_noise_1d(float x)

Parameters

x float

get_noise_2d(float, float)

Qualifiers: const

Returns the 2D noise value at the given position.

float get_noise_2d(float x, float y)

Parameters

x float
y float

get_noise_2dv(Vector2)

Qualifiers: const

Returns the 2D noise value at the given position.

float get_noise_2dv(Vector2 v)

Parameters

v Vector2

get_noise_3d(float, float, float)

Qualifiers: const

Returns the 3D noise value at the given position.

float get_noise_3d(float x, float y, float z)

Parameters

x float
y float
z float

get_noise_3dv(Vector3)

Qualifiers: const

Returns the 3D noise value at the given position.

float get_noise_3dv(Vector3 v)

Parameters

v Vector3

get_seamless_image(int, int, bool, bool, float, bool)

Qualifiers: const

Returns an Image containing seamless 2D noise values.

Note: With normalize set to false, the default implementation expects the noise generator to return values in the range -1.0 to 1.0.

Image get_seamless_image(int width, int height, bool invert, bool in_3d_space, float skirt, bool normalize)

Parameters

width int
height int
invert bool
in_3d_space bool
skirt float
normalize bool

get_seamless_image_3d(int, int, int, bool, float, bool)

Qualifiers: const

Returns an Array of Images containing seamless 3D noise values for use with ImageTexture3D.create.

Note: With normalize set to false, the default implementation expects the noise generator to return values in the range -1.0 to 1.0.

Image[] get_seamless_image_3d(int width, int height, int depth, bool invert, float skirt, bool normalize)

Parameters

width int
height int
depth int
invert bool
skirt float
normalize bool