: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/doc/classes/FogMaterial.xml. .. _class_FogMaterial: FogMaterial =========== **Inherits:** :ref:`Material` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` A material that controls how volumetric fog is rendered, to be assigned to a :ref:`FogVolume`. .. rst-class:: classref-introduction-group Description ----------- A :ref:`Material` resource that can be used by :ref:`FogVolume`\ s to draw volumetric effects. If you need more advanced effects, use a custom :doc:`fog shader <../tutorials/shaders/shader_reference/fog_shader>`. .. rst-class:: classref-reftable-group Properties ---------- .. table:: :widths: auto +-----------------------------------+--------------------------------------------------------------------+-----------------------+ | :ref:`Color` | :ref:`albedo` | ``Color(1, 1, 1, 1)`` | +-----------------------------------+--------------------------------------------------------------------+-----------------------+ | :ref:`float` | :ref:`density` | ``1.0`` | +-----------------------------------+--------------------------------------------------------------------+-----------------------+ | :ref:`Texture3D` | :ref:`density_texture` | | +-----------------------------------+--------------------------------------------------------------------+-----------------------+ | :ref:`float` | :ref:`edge_fade` | ``0.1`` | +-----------------------------------+--------------------------------------------------------------------+-----------------------+ | :ref:`Color` | :ref:`emission` | ``Color(0, 0, 0, 1)`` | +-----------------------------------+--------------------------------------------------------------------+-----------------------+ | :ref:`float` | :ref:`height_falloff` | ``0.0`` | +-----------------------------------+--------------------------------------------------------------------+-----------------------+ .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_FogMaterial_property_albedo: .. rst-class:: classref-property :ref:`Color` **albedo** = ``Color(1, 1, 1, 1)`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_albedo**\ (\ value\: :ref:`Color`\ ) - :ref:`Color` **get_albedo**\ (\ ) The single-scattering :ref:`Color` of the :ref:`FogVolume`. Internally, :ref:`albedo` is converted into single-scattering, which is additively blended with other :ref:`FogVolume`\ s and the :ref:`Environment.volumetric_fog_albedo`. .. rst-class:: classref-item-separator ---- .. _class_FogMaterial_property_density: .. rst-class:: classref-property :ref:`float` **density** = ``1.0`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_density**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_density**\ (\ ) The density of the :ref:`FogVolume`. Denser objects are more opaque, but may suffer from under-sampling artifacts that look like stripes. Negative values can be used to subtract fog from other :ref:`FogVolume`\ s or global volumetric fog. \ **Note:** Due to limited precision, :ref:`density` values between ``-0.001`` and ``0.001`` (exclusive) act like ``0.0``. This does not apply to :ref:`Environment.volumetric_fog_density`. .. rst-class:: classref-item-separator ---- .. _class_FogMaterial_property_density_texture: .. rst-class:: classref-property :ref:`Texture3D` **density_texture** :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_density_texture**\ (\ value\: :ref:`Texture3D`\ ) - :ref:`Texture3D` **get_density_texture**\ (\ ) The 3D texture that is used to scale the :ref:`density` of the :ref:`FogVolume`. This can be used to vary fog density within the :ref:`FogVolume` with any kind of static pattern. For animated effects, consider using a custom :doc:`fog shader <../tutorials/shaders/shader_reference/fog_shader>`. .. rst-class:: classref-item-separator ---- .. _class_FogMaterial_property_edge_fade: .. rst-class:: classref-property :ref:`float` **edge_fade** = ``0.1`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_edge_fade**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_edge_fade**\ (\ ) The hardness of the edges of the :ref:`FogVolume`. A higher value will result in softer edges, while a lower value will result in harder edges. .. rst-class:: classref-item-separator ---- .. _class_FogMaterial_property_emission: .. rst-class:: classref-property :ref:`Color` **emission** = ``Color(0, 0, 0, 1)`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_emission**\ (\ value\: :ref:`Color`\ ) - :ref:`Color` **get_emission**\ (\ ) The :ref:`Color` of the light emitted by the :ref:`FogVolume`. Emitted light will not cast light or shadows on other objects, but can be useful for modulating the :ref:`Color` of the :ref:`FogVolume` independently from light sources. .. rst-class:: classref-item-separator ---- .. _class_FogMaterial_property_height_falloff: .. rst-class:: classref-property :ref:`float` **height_falloff** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_height_falloff**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_height_falloff**\ (\ ) The rate by which the height-based fog decreases in density as height increases in world space. A high falloff will result in a sharp transition, while a low falloff will result in a smoother transition. A value of ``0.0`` results in uniform-density fog. The height threshold is determined by the height of the associated :ref:`FogVolume`. .. |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.)`