:github_url: hide .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/4.0/doc/tools/make_rst.py. .. XML source: https://github.com/godotengine/godot/tree/4.0/modules/noise/doc_classes/FastNoiseLite.xml. .. _class_FastNoiseLite: FastNoiseLite ============= **Inherits:** :ref:`Noise` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` Generates noise using the FastNoiseLite library. .. rst-class:: classref-introduction-group 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]``, however not always. Some of the cellular noise algorithms return results above ``1``. .. rst-class:: classref-reftable-group Properties ---------- .. table:: :widths: auto +------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ | :ref:`CellularDistanceFunction` | :ref:`cellular_distance_function` | ``0`` | +------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ | :ref:`float` | :ref:`cellular_jitter` | ``0.45`` | +------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ | :ref:`CellularReturnType` | :ref:`cellular_return_type` | ``1`` | +------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ | :ref:`float` | :ref:`domain_warp_amplitude` | ``30.0`` | +------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ | :ref:`bool` | :ref:`domain_warp_enabled` | ``false`` | +------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ | :ref:`float` | :ref:`domain_warp_fractal_gain` | ``0.5`` | +------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ | :ref:`float` | :ref:`domain_warp_fractal_lacunarity` | ``6.0`` | +------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ | :ref:`int` | :ref:`domain_warp_fractal_octaves` | ``5`` | +------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ | :ref:`DomainWarpFractalType` | :ref:`domain_warp_fractal_type` | ``1`` | +------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ | :ref:`float` | :ref:`domain_warp_frequency` | ``0.05`` | +------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ | :ref:`DomainWarpType` | :ref:`domain_warp_type` | ``0`` | +------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ | :ref:`float` | :ref:`fractal_gain` | ``0.5`` | +------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ | :ref:`float` | :ref:`fractal_lacunarity` | ``2.0`` | +------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ | :ref:`int` | :ref:`fractal_octaves` | ``5`` | +------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ | :ref:`float` | :ref:`fractal_ping_pong_strength` | ``2.0`` | +------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ | :ref:`FractalType` | :ref:`fractal_type` | ``1`` | +------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ | :ref:`float` | :ref:`fractal_weighted_strength` | ``0.0`` | +------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ | :ref:`float` | :ref:`frequency` | ``0.01`` | +------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ | :ref:`NoiseType` | :ref:`noise_type` | ``1`` | +------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ | :ref:`Vector3` | :ref:`offset` | ``Vector3(0, 0, 0)`` | +------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ | :ref:`int` | :ref:`seed` | ``0`` | +------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_FastNoiseLite_NoiseType: .. rst-class:: classref-enumeration enum **NoiseType**: .. _class_FastNoiseLite_constant_TYPE_VALUE: .. rst-class:: classref-enumeration-constant :ref:`NoiseType` **TYPE_VALUE** = ``5`` A lattice of points are assigned random values then interpolated based on neighboring values. .. _class_FastNoiseLite_constant_TYPE_VALUE_CUBIC: .. rst-class:: classref-enumeration-constant :ref:`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. .. _class_FastNoiseLite_constant_TYPE_PERLIN: .. rst-class:: classref-enumeration-constant :ref:`NoiseType` **TYPE_PERLIN** = ``3`` A lattice of random gradients. Their dot products are interpolated to obtain values in between the lattices. .. _class_FastNoiseLite_constant_TYPE_CELLULAR: .. rst-class:: classref-enumeration-constant :ref:`NoiseType` **TYPE_CELLULAR** = ``2`` Cellular includes both Worley noise and Voronoi diagrams which creates various regions of the same value. .. _class_FastNoiseLite_constant_TYPE_SIMPLEX: .. rst-class:: classref-enumeration-constant :ref:`NoiseType` **TYPE_SIMPLEX** = ``0`` As opposed to :ref:`TYPE_PERLIN`, gradients exist in a simplex lattice rather than a grid lattice, avoiding directional artifacts. .. _class_FastNoiseLite_constant_TYPE_SIMPLEX_SMOOTH: .. rst-class:: classref-enumeration-constant :ref:`NoiseType` **TYPE_SIMPLEX_SMOOTH** = ``1`` Modified, higher quality version of :ref:`TYPE_SIMPLEX`, but slower. .. rst-class:: classref-item-separator ---- .. _enum_FastNoiseLite_FractalType: .. rst-class:: classref-enumeration enum **FractalType**: .. _class_FastNoiseLite_constant_FRACTAL_NONE: .. rst-class:: classref-enumeration-constant :ref:`FractalType` **FRACTAL_NONE** = ``0`` No fractal noise. .. _class_FastNoiseLite_constant_FRACTAL_FBM: .. rst-class:: classref-enumeration-constant :ref:`FractalType` **FRACTAL_FBM** = ``1`` Method using Fractional Brownian Motion to combine octaves into a fractal. .. _class_FastNoiseLite_constant_FRACTAL_RIDGED: .. rst-class:: classref-enumeration-constant :ref:`FractalType` **FRACTAL_RIDGED** = ``2`` Method of combining octaves into a fractal resulting in a "ridged" look. .. _class_FastNoiseLite_constant_FRACTAL_PING_PONG: .. rst-class:: classref-enumeration-constant :ref:`FractalType` **FRACTAL_PING_PONG** = ``3`` Method of combining octaves into a fractal with a ping pong effect. .. rst-class:: classref-item-separator ---- .. _enum_FastNoiseLite_CellularDistanceFunction: .. rst-class:: classref-enumeration enum **CellularDistanceFunction**: .. _class_FastNoiseLite_constant_DISTANCE_EUCLIDEAN: .. rst-class:: classref-enumeration-constant :ref:`CellularDistanceFunction` **DISTANCE_EUCLIDEAN** = ``0`` Euclidean distance to the nearest point. .. _class_FastNoiseLite_constant_DISTANCE_EUCLIDEAN_SQUARED: .. rst-class:: classref-enumeration-constant :ref:`CellularDistanceFunction` **DISTANCE_EUCLIDEAN_SQUARED** = ``1`` Squared Euclidean distance to the nearest point. .. _class_FastNoiseLite_constant_DISTANCE_MANHATTAN: .. rst-class:: classref-enumeration-constant :ref:`CellularDistanceFunction` **DISTANCE_MANHATTAN** = ``2`` Manhattan distance (taxicab metric) to the nearest point. .. _class_FastNoiseLite_constant_DISTANCE_HYBRID: .. rst-class:: classref-enumeration-constant :ref:`CellularDistanceFunction` **DISTANCE_HYBRID** = ``3`` Blend of :ref:`DISTANCE_EUCLIDEAN` and :ref:`DISTANCE_MANHATTAN` to give curved cell boundaries .. rst-class:: classref-item-separator ---- .. _enum_FastNoiseLite_CellularReturnType: .. rst-class:: classref-enumeration enum **CellularReturnType**: .. _class_FastNoiseLite_constant_RETURN_CELL_VALUE: .. rst-class:: classref-enumeration-constant :ref:`CellularReturnType` **RETURN_CELL_VALUE** = ``0`` The cellular distance function will return the same value for all points within a cell. .. _class_FastNoiseLite_constant_RETURN_DISTANCE: .. rst-class:: classref-enumeration-constant :ref:`CellularReturnType` **RETURN_DISTANCE** = ``1`` The cellular distance function will return a value determined by the distance to the nearest point. .. _class_FastNoiseLite_constant_RETURN_DISTANCE2: .. rst-class:: classref-enumeration-constant :ref:`CellularReturnType` **RETURN_DISTANCE2** = ``2`` The cellular distance function returns the distance to the second-nearest point. .. _class_FastNoiseLite_constant_RETURN_DISTANCE2_ADD: .. rst-class:: classref-enumeration-constant :ref:`CellularReturnType` **RETURN_DISTANCE2_ADD** = ``3`` The distance to the nearest point is added to the distance to the second-nearest point. .. _class_FastNoiseLite_constant_RETURN_DISTANCE2_SUB: .. rst-class:: classref-enumeration-constant :ref:`CellularReturnType` **RETURN_DISTANCE2_SUB** = ``4`` The distance to the nearest point is subtracted from the distance to the second-nearest point. .. _class_FastNoiseLite_constant_RETURN_DISTANCE2_MUL: .. rst-class:: classref-enumeration-constant :ref:`CellularReturnType` **RETURN_DISTANCE2_MUL** = ``5`` The distance to the nearest point is multiplied with the distance to the second-nearest point. .. _class_FastNoiseLite_constant_RETURN_DISTANCE2_DIV: .. rst-class:: classref-enumeration-constant :ref:`CellularReturnType` **RETURN_DISTANCE2_DIV** = ``6`` The distance to the nearest point is divided by the distance to the second-nearest point. .. rst-class:: classref-item-separator ---- .. _enum_FastNoiseLite_DomainWarpType: .. rst-class:: classref-enumeration enum **DomainWarpType**: .. _class_FastNoiseLite_constant_DOMAIN_WARP_SIMPLEX: .. rst-class:: classref-enumeration-constant :ref:`DomainWarpType` **DOMAIN_WARP_SIMPLEX** = ``0`` The domain is warped using the simplex noise algorithm. .. _class_FastNoiseLite_constant_DOMAIN_WARP_SIMPLEX_REDUCED: .. rst-class:: classref-enumeration-constant :ref:`DomainWarpType` **DOMAIN_WARP_SIMPLEX_REDUCED** = ``1`` The domain is warped using a simplified version of the simplex noise algorithm. .. _class_FastNoiseLite_constant_DOMAIN_WARP_BASIC_GRID: .. rst-class:: classref-enumeration-constant :ref:`DomainWarpType` **DOMAIN_WARP_BASIC_GRID** = ``2`` The domain is warped using a simple noise grid (not as smooth as the other methods, but more performant). .. rst-class:: classref-item-separator ---- .. _enum_FastNoiseLite_DomainWarpFractalType: .. rst-class:: classref-enumeration enum **DomainWarpFractalType**: .. _class_FastNoiseLite_constant_DOMAIN_WARP_FRACTAL_NONE: .. rst-class:: classref-enumeration-constant :ref:`DomainWarpFractalType` **DOMAIN_WARP_FRACTAL_NONE** = ``0`` No fractal noise for warping the space. .. _class_FastNoiseLite_constant_DOMAIN_WARP_FRACTAL_PROGRESSIVE: .. rst-class:: classref-enumeration-constant :ref:`DomainWarpFractalType` **DOMAIN_WARP_FRACTAL_PROGRESSIVE** = ``1`` Warping the space progressively, octave for octave, resulting in a more "liquified" distortion. .. _class_FastNoiseLite_constant_DOMAIN_WARP_FRACTAL_INDEPENDENT: .. rst-class:: classref-enumeration-constant :ref:`DomainWarpFractalType` **DOMAIN_WARP_FRACTAL_INDEPENDENT** = ``2`` Warping the space independently for each octave, resulting in a more chaotic distortion. .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_FastNoiseLite_property_cellular_distance_function: .. rst-class:: classref-property :ref:`CellularDistanceFunction` **cellular_distance_function** = ``0`` .. rst-class:: classref-property-setget - void **set_cellular_distance_function** **(** :ref:`CellularDistanceFunction` value **)** - :ref:`CellularDistanceFunction` **get_cellular_distance_function** **(** **)** Determines how the distance to the nearest/second-nearest point is computed. See :ref:`CellularDistanceFunction` for options. .. rst-class:: classref-item-separator ---- .. _class_FastNoiseLite_property_cellular_jitter: .. rst-class:: classref-property :ref:`float` **cellular_jitter** = ``0.45`` .. rst-class:: classref-property-setget - void **set_cellular_jitter** **(** :ref:`float` value **)** - :ref:`float` **get_cellular_jitter** **(** **)** Maximum distance a point can move off of its grid position. Set to ``0`` for an even grid. .. rst-class:: classref-item-separator ---- .. _class_FastNoiseLite_property_cellular_return_type: .. rst-class:: classref-property :ref:`CellularReturnType` **cellular_return_type** = ``1`` .. rst-class:: classref-property-setget - void **set_cellular_return_type** **(** :ref:`CellularReturnType` value **)** - :ref:`CellularReturnType` **get_cellular_return_type** **(** **)** Return type from cellular noise calculations. See :ref:`CellularReturnType`. .. rst-class:: classref-item-separator ---- .. _class_FastNoiseLite_property_domain_warp_amplitude: .. rst-class:: classref-property :ref:`float` **domain_warp_amplitude** = ``30.0`` .. rst-class:: classref-property-setget - void **set_domain_warp_amplitude** **(** :ref:`float` value **)** - :ref:`float` **get_domain_warp_amplitude** **(** **)** Sets the maximum warp distance from the origin. .. rst-class:: classref-item-separator ---- .. _class_FastNoiseLite_property_domain_warp_enabled: .. rst-class:: classref-property :ref:`bool` **domain_warp_enabled** = ``false`` .. rst-class:: classref-property-setget - void **set_domain_warp_enabled** **(** :ref:`bool` value **)** - :ref:`bool` **is_domain_warp_enabled** **(** **)** If enabled, another FastNoiseLite instance is used to warp the space, resulting in a distortion of the noise. .. rst-class:: classref-item-separator ---- .. _class_FastNoiseLite_property_domain_warp_fractal_gain: .. rst-class:: classref-property :ref:`float` **domain_warp_fractal_gain** = ``0.5`` .. rst-class:: classref-property-setget - void **set_domain_warp_fractal_gain** **(** :ref:`float` value **)** - :ref:`float` **get_domain_warp_fractal_gain** **(** **)** Determines the strength of each subsequent layer of the noise which is used to warp the space. A low value places more emphasis on the lower frequency base layers, while a high value puts more emphasis on the higher frequency layers. .. rst-class:: classref-item-separator ---- .. _class_FastNoiseLite_property_domain_warp_fractal_lacunarity: .. rst-class:: classref-property :ref:`float` **domain_warp_fractal_lacunarity** = ``6.0`` .. rst-class:: classref-property-setget - void **set_domain_warp_fractal_lacunarity** **(** :ref:`float` value **)** - :ref:`float` **get_domain_warp_fractal_lacunarity** **(** **)** Octave lacunarity of the fractal noise which warps the space. Increasing this value results in higher octaves producing noise with finer details and a rougher appearance. .. rst-class:: classref-item-separator ---- .. _class_FastNoiseLite_property_domain_warp_fractal_octaves: .. rst-class:: classref-property :ref:`int` **domain_warp_fractal_octaves** = ``5`` .. rst-class:: classref-property-setget - void **set_domain_warp_fractal_octaves** **(** :ref:`int` value **)** - :ref:`int` **get_domain_warp_fractal_octaves** **(** **)** The number of noise layers that are sampled to get the final value for the fractal noise which warps the space. .. rst-class:: classref-item-separator ---- .. _class_FastNoiseLite_property_domain_warp_fractal_type: .. rst-class:: classref-property :ref:`DomainWarpFractalType` **domain_warp_fractal_type** = ``1`` .. rst-class:: classref-property-setget - void **set_domain_warp_fractal_type** **(** :ref:`DomainWarpFractalType` value **)** - :ref:`DomainWarpFractalType` **get_domain_warp_fractal_type** **(** **)** The method for combining octaves into a fractal which is used to warp the space. See :ref:`DomainWarpFractalType`. .. rst-class:: classref-item-separator ---- .. _class_FastNoiseLite_property_domain_warp_frequency: .. rst-class:: classref-property :ref:`float` **domain_warp_frequency** = ``0.05`` .. rst-class:: classref-property-setget - void **set_domain_warp_frequency** **(** :ref:`float` value **)** - :ref:`float` **get_domain_warp_frequency** **(** **)** Frequency of the noise which warps the space. Low frequency results in smooth noise while high frequency results in rougher, more granular noise. .. rst-class:: classref-item-separator ---- .. _class_FastNoiseLite_property_domain_warp_type: .. rst-class:: classref-property :ref:`DomainWarpType` **domain_warp_type** = ``0`` .. rst-class:: classref-property-setget - void **set_domain_warp_type** **(** :ref:`DomainWarpType` value **)** - :ref:`DomainWarpType` **get_domain_warp_type** **(** **)** Sets the warp algorithm. See :ref:`DomainWarpType`. .. rst-class:: classref-item-separator ---- .. _class_FastNoiseLite_property_fractal_gain: .. rst-class:: classref-property :ref:`float` **fractal_gain** = ``0.5`` .. rst-class:: classref-property-setget - void **set_fractal_gain** **(** :ref:`float` value **)** - :ref:`float` **get_fractal_gain** **(** **)** Determines the strength of each subsequent layer of noise in fractal noise. A low value places more emphasis on the lower frequency base layers, while a high value puts more emphasis on the higher frequency layers. .. rst-class:: classref-item-separator ---- .. _class_FastNoiseLite_property_fractal_lacunarity: .. rst-class:: classref-property :ref:`float` **fractal_lacunarity** = ``2.0`` .. rst-class:: classref-property-setget - void **set_fractal_lacunarity** **(** :ref:`float` value **)** - :ref:`float` **get_fractal_lacunarity** **(** **)** Frequency multiplier between subsequent octaves. Increasing this value results in higher octaves producing noise with finer details and a rougher appearance. .. rst-class:: classref-item-separator ---- .. _class_FastNoiseLite_property_fractal_octaves: .. rst-class:: classref-property :ref:`int` **fractal_octaves** = ``5`` .. rst-class:: classref-property-setget - void **set_fractal_octaves** **(** :ref:`int` value **)** - :ref:`int` **get_fractal_octaves** **(** **)** The number of noise layers that are sampled to get the final value for fractal noise types. .. rst-class:: classref-item-separator ---- .. _class_FastNoiseLite_property_fractal_ping_pong_strength: .. rst-class:: classref-property :ref:`float` **fractal_ping_pong_strength** = ``2.0`` .. rst-class:: classref-property-setget - void **set_fractal_ping_pong_strength** **(** :ref:`float` value **)** - :ref:`float` **get_fractal_ping_pong_strength** **(** **)** Sets the strength of the fractal ping pong type. .. rst-class:: classref-item-separator ---- .. _class_FastNoiseLite_property_fractal_type: .. rst-class:: classref-property :ref:`FractalType` **fractal_type** = ``1`` .. rst-class:: classref-property-setget - void **set_fractal_type** **(** :ref:`FractalType` value **)** - :ref:`FractalType` **get_fractal_type** **(** **)** The method for combining octaves into a fractal. See :ref:`FractalType`. .. rst-class:: classref-item-separator ---- .. _class_FastNoiseLite_property_fractal_weighted_strength: .. rst-class:: classref-property :ref:`float` **fractal_weighted_strength** = ``0.0`` .. rst-class:: classref-property-setget - void **set_fractal_weighted_strength** **(** :ref:`float` value **)** - :ref:`float` **get_fractal_weighted_strength** **(** **)** Higher weighting means higher octaves have less impact if lower octaves have a large impact. .. rst-class:: classref-item-separator ---- .. _class_FastNoiseLite_property_frequency: .. rst-class:: classref-property :ref:`float` **frequency** = ``0.01`` .. rst-class:: classref-property-setget - void **set_frequency** **(** :ref:`float` value **)** - :ref:`float` **get_frequency** **(** **)** The frequency for all noise types. Low frequency results in smooth noise while high frequency results in rougher, more granular noise. .. rst-class:: classref-item-separator ---- .. _class_FastNoiseLite_property_noise_type: .. rst-class:: classref-property :ref:`NoiseType` **noise_type** = ``1`` .. rst-class:: classref-property-setget - void **set_noise_type** **(** :ref:`NoiseType` value **)** - :ref:`NoiseType` **get_noise_type** **(** **)** The noise algorithm used. See :ref:`NoiseType`. .. rst-class:: classref-item-separator ---- .. _class_FastNoiseLite_property_offset: .. rst-class:: classref-property :ref:`Vector3` **offset** = ``Vector3(0, 0, 0)`` .. rst-class:: classref-property-setget - void **set_offset** **(** :ref:`Vector3` value **)** - :ref:`Vector3` **get_offset** **(** **)** Translate the noise input coordinates by the given :ref:`Vector3`. .. rst-class:: classref-item-separator ---- .. _class_FastNoiseLite_property_seed: .. rst-class:: classref-property :ref:`int` **seed** = ``0`` .. rst-class:: classref-property-setget - void **set_seed** **(** :ref:`int` value **)** - :ref:`int` **get_seed** **(** **)** The random number seed for all noise types. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`