:github_url: hide .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. .. XML source: https://github.com/godotengine/godot/tree/master/modules/noise/doc_classes/Noise.xml. .. _class_Noise: Noise ===== **Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` **Inherited By:** :ref:`FastNoiseLite` Abstract base class for noise generators. .. rst-class:: classref-introduction-group Description ----------- This class defines the interface for noise generation libraries to inherit from. A default :ref:`get_seamless_image()` implementation is provided for libraries that do not provide seamless noise. This function requests a larger image from the :ref:`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. .. rst-class:: classref-reftable-group Methods ------- .. table:: :widths: auto +--------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Image` | :ref:`get_image`\ (\ width\: :ref:`int`, height\: :ref:`int`, invert\: :ref:`bool` = false, in_3d_space\: :ref:`bool` = false, normalize\: :ref:`bool` = true\ ) |const| | +--------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Array`\[:ref:`Image`\] | :ref:`get_image_3d`\ (\ width\: :ref:`int`, height\: :ref:`int`, depth\: :ref:`int`, invert\: :ref:`bool` = false, normalize\: :ref:`bool` = true\ ) |const| | +--------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_noise_1d`\ (\ x\: :ref:`float`\ ) |const| | +--------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_noise_2d`\ (\ x\: :ref:`float`, y\: :ref:`float`\ ) |const| | +--------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_noise_2dv`\ (\ v\: :ref:`Vector2`\ ) |const| | +--------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_noise_3d`\ (\ x\: :ref:`float`, y\: :ref:`float`, z\: :ref:`float`\ ) |const| | +--------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_noise_3dv`\ (\ v\: :ref:`Vector3`\ ) |const| | +--------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Image` | :ref:`get_seamless_image`\ (\ width\: :ref:`int`, height\: :ref:`int`, invert\: :ref:`bool` = false, in_3d_space\: :ref:`bool` = false, skirt\: :ref:`float` = 0.1, normalize\: :ref:`bool` = true\ ) |const| | +--------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Array`\[:ref:`Image`\] | :ref:`get_seamless_image_3d`\ (\ width\: :ref:`int`, height\: :ref:`int`, depth\: :ref:`int`, invert\: :ref:`bool` = false, skirt\: :ref:`float` = 0.1, normalize\: :ref:`bool` = true\ ) |const| | +--------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_Noise_method_get_image: .. rst-class:: classref-method :ref:`Image` **get_image**\ (\ width\: :ref:`int`, height\: :ref:`int`, invert\: :ref:`bool` = false, in_3d_space\: :ref:`bool` = false, normalize\: :ref:`bool` = true\ ) |const| :ref:`🔗` Returns an :ref:`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``. .. rst-class:: classref-item-separator ---- .. _class_Noise_method_get_image_3d: .. rst-class:: classref-method :ref:`Array`\[:ref:`Image`\] **get_image_3d**\ (\ width\: :ref:`int`, height\: :ref:`int`, depth\: :ref:`int`, invert\: :ref:`bool` = false, normalize\: :ref:`bool` = true\ ) |const| :ref:`🔗` Returns an :ref:`Array` of :ref:`Image`\ s containing 3D noise values for use with :ref:`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``. .. rst-class:: classref-item-separator ---- .. _class_Noise_method_get_noise_1d: .. rst-class:: classref-method :ref:`float` **get_noise_1d**\ (\ x\: :ref:`float`\ ) |const| :ref:`🔗` Returns the 1D noise value at the given (x) coordinate. .. rst-class:: classref-item-separator ---- .. _class_Noise_method_get_noise_2d: .. rst-class:: classref-method :ref:`float` **get_noise_2d**\ (\ x\: :ref:`float`, y\: :ref:`float`\ ) |const| :ref:`🔗` Returns the 2D noise value at the given position. .. rst-class:: classref-item-separator ---- .. _class_Noise_method_get_noise_2dv: .. rst-class:: classref-method :ref:`float` **get_noise_2dv**\ (\ v\: :ref:`Vector2`\ ) |const| :ref:`🔗` Returns the 2D noise value at the given position. .. rst-class:: classref-item-separator ---- .. _class_Noise_method_get_noise_3d: .. rst-class:: classref-method :ref:`float` **get_noise_3d**\ (\ x\: :ref:`float`, y\: :ref:`float`, z\: :ref:`float`\ ) |const| :ref:`🔗` Returns the 3D noise value at the given position. .. rst-class:: classref-item-separator ---- .. _class_Noise_method_get_noise_3dv: .. rst-class:: classref-method :ref:`float` **get_noise_3dv**\ (\ v\: :ref:`Vector3`\ ) |const| :ref:`🔗` Returns the 3D noise value at the given position. .. rst-class:: classref-item-separator ---- .. _class_Noise_method_get_seamless_image: .. rst-class:: classref-method :ref:`Image` **get_seamless_image**\ (\ width\: :ref:`int`, height\: :ref:`int`, invert\: :ref:`bool` = false, in_3d_space\: :ref:`bool` = false, skirt\: :ref:`float` = 0.1, normalize\: :ref:`bool` = true\ ) |const| :ref:`🔗` Returns an :ref:`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``. .. rst-class:: classref-item-separator ---- .. _class_Noise_method_get_seamless_image_3d: .. rst-class:: classref-method :ref:`Array`\[:ref:`Image`\] **get_seamless_image_3d**\ (\ width\: :ref:`int`, height\: :ref:`int`, depth\: :ref:`int`, invert\: :ref:`bool` = false, skirt\: :ref:`float` = 0.1, normalize\: :ref:`bool` = true\ ) |const| :ref:`🔗` Returns an :ref:`Array` of :ref:`Image`\ s containing seamless 3D noise values for use with :ref:`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``. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` .. |void| replace:: :abbr:`void (No return value.)`