:github_url: hide .. Generated automatically by doc/tools/make_rst.py in Godot's source tree. .. DO NOT EDIT THIS FILE, but the ProceduralSkyMaterial.xml source instead. .. The source is found in doc/classes or modules//doc_classes. .. _class_ProceduralSkyMaterial: ProceduralSkyMaterial ===================== **Inherits:** :ref:`Material` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` A :ref:`Material` used with :ref:`Sky` to generate a background based on user input parameters. Description ----------- ProceduralSkyMaterial provides a way to create an effective background quickly by defining procedural parameters for the sun, the sky and the ground. The sky and ground are very similar, they are defined by a color at the horizon, another color, and finally an easing curve to interpolate between these two colors. Similarly, the sun is described by a position in the sky, a color, and an easing curve. However, the sun also defines a minimum and maximum angle, these two values define at what distance the easing curve begins and ends from the sun, and thus end up defining the size of the sun in the sky. The ``ProceduralSkyMaterial`` uses a lightweight shader to draw the sky and is thus suited for real time updates. When you do not need a quick sky that is not realistic, this is a good option. If you need a more realistic option, try using :ref:`PhysicalSkyMaterial` instead. The ``ProceduralSkyMaterial`` supports up to 4 suns. Each sun takes its color, energy, and direction from the corresponding :ref:`DirectionalLight3D` in the scene. Properties ---------- +---------------------------+----------------------------------------------------------------------------------------+--------------------------------------+ | :ref:`Color` | :ref:`ground_bottom_color` | ``Color(0.2, 0.169, 0.133, 1)`` | +---------------------------+----------------------------------------------------------------------------------------+--------------------------------------+ | :ref:`float` | :ref:`ground_curve` | ``0.02`` | +---------------------------+----------------------------------------------------------------------------------------+--------------------------------------+ | :ref:`float` | :ref:`ground_energy` | ``1.0`` | +---------------------------+----------------------------------------------------------------------------------------+--------------------------------------+ | :ref:`Color` | :ref:`ground_horizon_color` | ``Color(0.6463, 0.6558, 0.6708, 1)`` | +---------------------------+----------------------------------------------------------------------------------------+--------------------------------------+ | :ref:`float` | :ref:`sky_curve` | ``0.15`` | +---------------------------+----------------------------------------------------------------------------------------+--------------------------------------+ | :ref:`float` | :ref:`sky_energy` | ``1.0`` | +---------------------------+----------------------------------------------------------------------------------------+--------------------------------------+ | :ref:`Color` | :ref:`sky_horizon_color` | ``Color(0.6463, 0.6558, 0.6708, 1)`` | +---------------------------+----------------------------------------------------------------------------------------+--------------------------------------+ | :ref:`Color` | :ref:`sky_top_color` | ``Color(0.385, 0.454, 0.55, 1)`` | +---------------------------+----------------------------------------------------------------------------------------+--------------------------------------+ | :ref:`float` | :ref:`sun_angle_max` | ``30.0`` | +---------------------------+----------------------------------------------------------------------------------------+--------------------------------------+ | :ref:`float` | :ref:`sun_curve` | ``0.15`` | +---------------------------+----------------------------------------------------------------------------------------+--------------------------------------+ Property Descriptions --------------------- .. _class_ProceduralSkyMaterial_property_ground_bottom_color: - :ref:`Color` **ground_bottom_color** +-----------+---------------------------------+ | *Default* | ``Color(0.2, 0.169, 0.133, 1)`` | +-----------+---------------------------------+ | *Setter* | set_ground_bottom_color(value) | +-----------+---------------------------------+ | *Getter* | get_ground_bottom_color() | +-----------+---------------------------------+ Color of the ground at the bottom. Blends with :ref:`ground_horizon_color`. ---- .. _class_ProceduralSkyMaterial_property_ground_curve: - :ref:`float` **ground_curve** +-----------+-------------------------+ | *Default* | ``0.02`` | +-----------+-------------------------+ | *Setter* | set_ground_curve(value) | +-----------+-------------------------+ | *Getter* | get_ground_curve() | +-----------+-------------------------+ How quickly the :ref:`ground_horizon_color` fades into the :ref:`ground_bottom_color`. ---- .. _class_ProceduralSkyMaterial_property_ground_energy: - :ref:`float` **ground_energy** +-----------+--------------------------+ | *Default* | ``1.0`` | +-----------+--------------------------+ | *Setter* | set_ground_energy(value) | +-----------+--------------------------+ | *Getter* | get_ground_energy() | +-----------+--------------------------+ Amount of energy contribution from the ground. ---- .. _class_ProceduralSkyMaterial_property_ground_horizon_color: - :ref:`Color` **ground_horizon_color** +-----------+--------------------------------------+ | *Default* | ``Color(0.6463, 0.6558, 0.6708, 1)`` | +-----------+--------------------------------------+ | *Setter* | set_ground_horizon_color(value) | +-----------+--------------------------------------+ | *Getter* | get_ground_horizon_color() | +-----------+--------------------------------------+ Color of the ground at the horizon. Blends with :ref:`ground_bottom_color`. ---- .. _class_ProceduralSkyMaterial_property_sky_curve: - :ref:`float` **sky_curve** +-----------+----------------------+ | *Default* | ``0.15`` | +-----------+----------------------+ | *Setter* | set_sky_curve(value) | +-----------+----------------------+ | *Getter* | get_sky_curve() | +-----------+----------------------+ How quickly the :ref:`sky_horizon_color` fades into the :ref:`sky_top_color`. ---- .. _class_ProceduralSkyMaterial_property_sky_energy: - :ref:`float` **sky_energy** +-----------+-----------------------+ | *Default* | ``1.0`` | +-----------+-----------------------+ | *Setter* | set_sky_energy(value) | +-----------+-----------------------+ | *Getter* | get_sky_energy() | +-----------+-----------------------+ Amount of energy contribution from the sky. ---- .. _class_ProceduralSkyMaterial_property_sky_horizon_color: - :ref:`Color` **sky_horizon_color** +-----------+--------------------------------------+ | *Default* | ``Color(0.6463, 0.6558, 0.6708, 1)`` | +-----------+--------------------------------------+ | *Setter* | set_sky_horizon_color(value) | +-----------+--------------------------------------+ | *Getter* | get_sky_horizon_color() | +-----------+--------------------------------------+ Color of the sky at the horizon. Blends with :ref:`sky_top_color`. ---- .. _class_ProceduralSkyMaterial_property_sky_top_color: - :ref:`Color` **sky_top_color** +-----------+----------------------------------+ | *Default* | ``Color(0.385, 0.454, 0.55, 1)`` | +-----------+----------------------------------+ | *Setter* | set_sky_top_color(value) | +-----------+----------------------------------+ | *Getter* | get_sky_top_color() | +-----------+----------------------------------+ Color of the sky at the top. Blends with :ref:`sky_horizon_color`. ---- .. _class_ProceduralSkyMaterial_property_sun_angle_max: - :ref:`float` **sun_angle_max** +-----------+--------------------------+ | *Default* | ``30.0`` | +-----------+--------------------------+ | *Setter* | set_sun_angle_max(value) | +-----------+--------------------------+ | *Getter* | get_sun_angle_max() | +-----------+--------------------------+ Distance from center of sun where it fades out completely. ---- .. _class_ProceduralSkyMaterial_property_sun_curve: - :ref:`float` **sun_curve** +-----------+----------------------+ | *Default* | ``0.15`` | +-----------+----------------------+ | *Setter* | set_sun_curve(value) | +-----------+----------------------+ | *Getter* | get_sun_curve() | +-----------+----------------------+ How quickly the sun fades away between the edge of the sun disk and :ref:`sun_angle_max`. .. |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.)`