FastNoiseLite

Inherits: Noise < Resource < RefCounted < Object

Generates noise using the FastNoiseLite library.

Description

This class generates noise using the FastNoiseLite library, which is a collection of several noise algorithms including Cellular, Perlin, Value, and more.

Most generated noise values are in the range of [-1, 1], but not always. Some of the cellular noise algorithms return results above 1.

Properties

CellularDistanceFunction

cellular_distance_function

0

float

cellular_jitter

1.0

CellularReturnType

cellular_return_type

1

float

domain_warp_amplitude

30.0

bool

domain_warp_enabled

false

float

domain_warp_fractal_gain

0.5

float

domain_warp_fractal_lacunarity

6.0

int

domain_warp_fractal_octaves

5

DomainWarpFractalType

domain_warp_fractal_type

1

float

domain_warp_frequency

0.05

DomainWarpType

domain_warp_type

0

float

fractal_gain

0.5

float

fractal_lacunarity

2.0

int

fractal_octaves

5

float

fractal_ping_pong_strength

2.0

FractalType

fractal_type

1

float

fractal_weighted_strength

0.0

float

frequency

0.01

NoiseType

noise_type

1

Vector3

offset

Vector3(0, 0, 0)

int

seed

0


Enumerations

enum NoiseType:

NoiseType TYPE_VALUE = 5

A lattice of points are assigned random values then interpolated based on neighboring values.

NoiseType TYPE_VALUE_CUBIC = 4

Similar to Value noise, but slower. Has more variance in peaks and valleys.

Cubic noise can be used to avoid certain artifacts when using value noise to create a bumpmap. In general, you should always use this mode if the value noise is being used for a heightmap or bumpmap.

NoiseType TYPE_PERLIN = 3

A lattice of random gradients. Their dot products are interpolated to obtain values in between the lattices.

NoiseType TYPE_CELLULAR = 2

Cellular includes both Worley noise and Voronoi diagrams which creates various regions of the same value.

NoiseType TYPE_SIMPLEX = 0

As opposed to TYPE_PERLIN, gradients exist in a simplex lattice rather than a grid lattice, avoiding directional artifacts.

NoiseType TYPE_SIMPLEX_SMOOTH = 1

Modified, higher quality version of TYPE_SIMPLEX, but slower.


enum FractalType:

FractalType FRACTAL_NONE = 0

No fractal noise.

FractalType FRACTAL_FBM = 1

Method using Fractional Brownian Motion to combine octaves into a fractal.

FractalType FRACTAL_RIDGED = 2

Method of combining octaves into a fractal resulting in a "ridged" look.

FractalType FRACTAL_PING_PONG = 3

Method of combining octaves into a fractal with a ping pong effect.


enum CellularDistanceFunction:

CellularDistanceFunction DISTANCE_EUCLIDEAN = 0

Euclidean distance to the nearest point.

CellularDistanceFunction DISTANCE_EUCLIDEAN_SQUARED = 1

Squared Euclidean distance to the nearest point.

CellularDistanceFunction DISTANCE_MANHATTAN = 2

Manhattan distance (taxicab metric) to the nearest point.