: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/PhysicalSkyMaterial.xml. .. _class_PhysicalSkyMaterial: PhysicalSkyMaterial =================== **Inherits:** :ref:`Material` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` A material that defines a sky for a :ref:`Sky` resource by a set of physical properties. .. rst-class:: classref-introduction-group Description ----------- The **PhysicalSkyMaterial** uses the Preetham analytic daylight model to draw a sky based on physical properties. This results in a substantially more realistic sky than the :ref:`ProceduralSkyMaterial`, but it is slightly slower and less flexible. The **PhysicalSkyMaterial** only supports one sun. The color, energy, and direction of the sun are taken from the first :ref:`DirectionalLight3D` in the scene tree. .. rst-class:: classref-reftable-group Properties ---------- .. table:: :widths: auto +-----------------------------------+--------------------------------------------------------------------------------------+----------------------------------+ | :ref:`float` | :ref:`energy_multiplier` | ``1.0`` | +-----------------------------------+--------------------------------------------------------------------------------------+----------------------------------+ | :ref:`Color` | :ref:`ground_color` | ``Color(0.1, 0.07, 0.034, 1)`` | +-----------------------------------+--------------------------------------------------------------------------------------+----------------------------------+ | :ref:`float` | :ref:`mie_coefficient` | ``0.005`` | +-----------------------------------+--------------------------------------------------------------------------------------+----------------------------------+ | :ref:`Color` | :ref:`mie_color` | ``Color(0.69, 0.729, 0.812, 1)`` | +-----------------------------------+--------------------------------------------------------------------------------------+----------------------------------+ | :ref:`float` | :ref:`mie_eccentricity` | ``0.8`` | +-----------------------------------+--------------------------------------------------------------------------------------+----------------------------------+ | :ref:`Texture2D` | :ref:`night_sky` | | +-----------------------------------+--------------------------------------------------------------------------------------+----------------------------------+ | :ref:`float` | :ref:`rayleigh_coefficient` | ``2.0`` | +-----------------------------------+--------------------------------------------------------------------------------------+----------------------------------+ | :ref:`Color` | :ref:`rayleigh_color` | ``Color(0.3, 0.405, 0.6, 1)`` | +-----------------------------------+--------------------------------------------------------------------------------------+----------------------------------+ | :ref:`float` | :ref:`sun_disk_scale` | ``1.0`` | +-----------------------------------+--------------------------------------------------------------------------------------+----------------------------------+ | :ref:`float` | :ref:`turbidity` | ``10.0`` | +-----------------------------------+--------------------------------------------------------------------------------------+----------------------------------+ | :ref:`bool` | :ref:`use_debanding` | ``true`` | +-----------------------------------+--------------------------------------------------------------------------------------+----------------------------------+ .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_PhysicalSkyMaterial_property_energy_multiplier: .. rst-class:: classref-property :ref:`float` **energy_multiplier** = ``1.0`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_energy_multiplier**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_energy_multiplier**\ (\ ) The sky's overall brightness multiplier. Higher values result in a brighter sky. .. rst-class:: classref-item-separator ---- .. _class_PhysicalSkyMaterial_property_ground_color: .. rst-class:: classref-property :ref:`Color` **ground_color** = ``Color(0.1, 0.07, 0.034, 1)`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_ground_color**\ (\ value\: :ref:`Color`\ ) - :ref:`Color` **get_ground_color**\ (\ ) Modulates the :ref:`Color` on the bottom half of the sky to represent the ground. .. rst-class:: classref-item-separator ---- .. _class_PhysicalSkyMaterial_property_mie_coefficient: .. rst-class:: classref-property :ref:`float` **mie_coefficient** = ``0.005`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_mie_coefficient**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_mie_coefficient**\ (\ ) Controls the strength of `Mie scattering `__ for the sky. Mie scattering results from light colliding with larger particles (like water). On earth, Mie scattering results in a whitish color around the sun and horizon. .. rst-class:: classref-item-separator ---- .. _class_PhysicalSkyMaterial_property_mie_color: .. rst-class:: classref-property :ref:`Color` **mie_color** = ``Color(0.69, 0.729, 0.812, 1)`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_mie_color**\ (\ value\: :ref:`Color`\ ) - :ref:`Color` **get_mie_color**\ (\ ) Controls the :ref:`Color` of the `Mie scattering `__ effect. While not physically accurate, this allows for the creation of alien-looking planets. .. rst-class:: classref-item-separator ---- .. _class_PhysicalSkyMaterial_property_mie_eccentricity: .. rst-class:: classref-property :ref:`float` **mie_eccentricity** = ``0.8`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_mie_eccentricity**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_mie_eccentricity**\ (\ ) Controls the direction of the `Mie scattering `__. A value of ``1`` means that when light hits a particle it's passing through straight forward. A value of ``-1`` means that all light is scatter backwards. .. rst-class:: classref-item-separator ---- .. _class_PhysicalSkyMaterial_property_night_sky: .. rst-class:: classref-property :ref:`Texture2D` **night_sky** :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_night_sky**\ (\ value\: :ref:`Texture2D`\ ) - :ref:`Texture2D` **get_night_sky**\ (\ ) :ref:`Texture2D` for the night sky. This is added to the sky, so if it is bright enough, it may be visible during the day. .. rst-class:: classref-item-separator ---- .. _class_PhysicalSkyMaterial_property_rayleigh_coefficient: .. rst-class:: classref-property :ref:`float` **rayleigh_coefficient** = ``2.0`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_rayleigh_coefficient**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_rayleigh_coefficient**\ (\ ) Controls the strength of the `Rayleigh scattering `__. Rayleigh scattering results from light colliding with small particles. It is responsible for the blue color of the sky. .. rst-class:: classref-item-separator ---- .. _class_PhysicalSkyMaterial_property_rayleigh_color: .. rst-class:: classref-property :ref:`Color` **rayleigh_color** = ``Color(0.3, 0.405, 0.6, 1)`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_rayleigh_color**\ (\ value\: :ref:`Color`\ ) - :ref:`Color` **get_rayleigh_color**\ (\ ) Controls the :ref:`Color` of the `Rayleigh scattering `__. While not physically accurate, this allows for the creation of alien-looking planets. For example, setting this to a red :ref:`Color` results in a Mars-looking atmosphere with a corresponding blue sunset. .. rst-class:: classref-item-separator ---- .. _class_PhysicalSkyMaterial_property_sun_disk_scale: .. rst-class:: classref-property :ref:`float` **sun_disk_scale** = ``1.0`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_sun_disk_scale**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_sun_disk_scale**\ (\ ) Sets the size of the sun disk. Default value is based on Sol's perceived size from Earth. .. rst-class:: classref-item-separator ---- .. _class_PhysicalSkyMaterial_property_turbidity: .. rst-class:: classref-property :ref:`float` **turbidity** = ``10.0`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_turbidity**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_turbidity**\ (\ ) Sets the thickness of the atmosphere. High turbidity creates a foggy-looking atmosphere, while a low turbidity results in a clearer atmosphere. .. rst-class:: classref-item-separator ---- .. _class_PhysicalSkyMaterial_property_use_debanding: .. rst-class:: classref-property :ref:`bool` **use_debanding** = ``true`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_use_debanding**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **get_use_debanding**\ (\ ) If ``true``, enables debanding. Debanding adds a small amount of noise which helps reduce banding that appears from the smooth changes in color in the sky. .. |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.)`