:github_url: hide .. Generated automatically by doc/tools/make_rst.py in Godot's source tree. .. DO NOT EDIT THIS FILE, but the FogMaterial.xml source instead. .. The source is found in doc/classes or modules//doc_classes. .. _class_FogMaterial: FogMaterial =========== **Inherits:** :ref:`Material` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` :ref:`Material` used with a :ref:`FogVolume` to draw things with the volumetric fog effect. Description ----------- A :ref:`Material` resource that can be used by :ref:`FogVolume`\ s to draw volumetric effects. Properties ---------- +-----------------------------------+--------------------------------------------------------------------+-----------------------+ | :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`` | +-----------------------------------+--------------------------------------------------------------------+-----------------------+ Property Descriptions --------------------- .. _class_FogMaterial_property_albedo: - :ref:`Color` **albedo** +-----------+-----------------------+ | *Default* | ``Color(1, 1, 1, 1)`` | +-----------+-----------------------+ | *Setter* | set_albedo(value) | +-----------+-----------------------+ | *Getter* | get_albedo() | +-----------+-----------------------+ Sets 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`. ---- .. _class_FogMaterial_property_density: - :ref:`float` **density** +-----------+--------------------+ | *Default* | ``1.0`` | +-----------+--------------------+ | *Setter* | set_density(value) | +-----------+--------------------+ | *Getter* | get_density() | +-----------+--------------------+ Sets the density of the :ref:`FogVolume`. Denser objects are more opaque, but may suffer from under-sampling artifacts that look like stripes. ---- .. _class_FogMaterial_property_density_texture: - :ref:`Texture3D` **density_texture** +----------+----------------------------+ | *Setter* | set_density_texture(value) | +----------+----------------------------+ | *Getter* | get_density_texture() | +----------+----------------------------+ Sets a 3D texture that is used to scale the :ref:`density` of the :ref:`FogVolume`. ---- .. _class_FogMaterial_property_edge_fade: - :ref:`float` **edge_fade** +-----------+----------------------+ | *Default* | ``0.1`` | +-----------+----------------------+ | *Setter* | set_edge_fade(value) | +-----------+----------------------+ | *Getter* | get_edge_fade() | +-----------+----------------------+ Sets the hardness of the edges of the :ref:`FogVolume`. A higher number will result in softer edges while a lower number will result in harder edges. ---- .. _class_FogMaterial_property_emission: - :ref:`Color` **emission** +-----------+-----------------------+ | *Default* | ``Color(0, 0, 0, 1)`` | +-----------+-----------------------+ | *Setter* | set_emission(value) | +-----------+-----------------------+ | *Getter* | get_emission() | +-----------+-----------------------+ Sets 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. ---- .. _class_FogMaterial_property_height_falloff: - :ref:`float` **height_falloff** +-----------+---------------------------+ | *Default* | ``0.0`` | +-----------+---------------------------+ | *Setter* | set_height_falloff(value) | +-----------+---------------------------+ | *Getter* | get_height_falloff() | +-----------+---------------------------+ Sets 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`` 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.)` .. |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.)`