ProceduralSkyMaterial

Hereda: Material < Resource < RefCounted < Object

Un material que define un cielo simple para un recurso Sky.

Descripción

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 defined by a main color, a color at the horizon, and an easing curve to interpolate between them. Suns are described by a position in the sky, a color, and a max angle from the sun at which the easing curve ends. The max angle therefore defines the size of the sun in the sky.

ProceduralSkyMaterial supports up to 4 suns, using the color, and energy, direction, and angular distance of the first four DirectionalLight3D nodes in the scene. This means that the suns are defined individually by the properties of their corresponding DirectionalLight3Ds and globally by sun_angle_max and sun_curve.

ProceduralSkyMaterial uses a lightweight shader to draw the sky and is therefore suited for real-time updates. This makes it a great option for a sky that is simple and computationally cheap, but unrealistic. If you need a more realistic procedural option, use PhysicalSkyMaterial.

Propiedades

float

energy_multiplier

1.0

Color

ground_bottom_color

Color(0.2, 0.169, 0.133, 1)

float

ground_curve

0.02

float

ground_energy_multiplier

1.0

Color

ground_horizon_color

Color(0.6463, 0.6558, 0.6708, 1)

Texture2D

sky_cover

Color

sky_cover_modulate

Color(1, 1, 1, 1)

float

sky_curve

0.15

float

sky_energy_multiplier

1.0

Color

sky_horizon_color

Color(0.6463, 0.6558, 0.6708, 1)

Color

sky_top_color

Color(0.385, 0.454, 0.55, 1)

float

sun_angle_max

30.0

float

sun_curve

0.15

bool

use_debanding

true


Descripciones de Propiedades

float energy_multiplier = 1.0 🔗

  • void set_energy_multiplier(value: float)

  • float get_energy_multiplier()

The sky's overall brightness multiplier. Higher values result in a brighter sky.


Color ground_bottom_color = Color(0.2, 0.169, 0.133, 1) 🔗

  • void set_ground_bottom_color(value: Color)

  • Color get_ground_bottom_color()

Color del suelo en la parte inferior. Se mezcla con ground_horizon_color.


float ground_curve = 0.02 🔗

  • void set_ground_curve(value: float)

  • float get_ground_curve()

Qué tan rápido se desvanece el ground_horizon_color en el ground_bottom_color.


float ground_energy_multiplier = 1.0 🔗

  • void set_ground_energy_multiplier(value: float)

  • float get_ground_energy_multiplier()

Multiplicador para el color del suelo. Un valor más alto hará que el suelo sea más brillante.


Color ground_horizon_color = Color(0.6463, 0.6558, 0.6708, 1) 🔗

  • void set_ground_horizon_color(value: Color)

  • Color get_ground_horizon_color()

Color del suelo en el horizonte. Se mezcla con ground_bottom_color.


Texture2D sky_cover 🔗

La textura de cobertura del cielo a utilizar. Esta textura debe usar una proyección equirrectangular (similar a PanoramaSkyMaterial). Los colores de la textura se añadirán al color del cielo existente, y se multiplicarán por sky_energy_multiplier y sky_cover_modulate. Esto es principalmente adecuado para mostrar estrellas por la noche, pero también se puede utilizar para mostrar nubes de día o de noche (con un aspecto no físicamente exacto).


Color sky_cover_modulate = Color(1, 1, 1, 1) 🔗

  • void set_sky_cover_modulate(value: Color)

  • Color get_sky_cover_modulate()

El tinte a aplicar a la textura sky_cover. Esto se puede usar para cambiar los colores u opacidad de la cobertura del cielo independientemente de la energía del cielo, lo cual es útil para las transiciones día/noche o climáticas. Solo es efectivo si se define una textura en sky_cover.


float sky_curve = 0.15 🔗

  • void set_sky_curve(value: float)

  • float get_sky_curve()

La rapidez con la que el sky_horizon_color se desvanece en el sky_top_color.


float sky_energy_multiplier = 1.0 🔗

  • void set_sky_energy_multiplier(value: float)

  • float get_sky_energy_multiplier()

Multiplicador para el color del cielo. Un valor más alto hará que el cielo sea más brillante.


Color sky_horizon_color = Color(0.6463, 0.6558, 0.6708, 1) 🔗

  • void set_sky_horizon_color(value: Color)

  • Color get_sky_horizon_color()

Color del cielo en el horizonte. Se mezcla con sky_top_color.


Color sky_top_color = Color(0.385, 0.454, 0.55, 1) 🔗

  • void set_sky_top_color(value: Color)

  • Color get_sky_top_color()

Color del cielo en la parte superior. Se mezcla con sky_horizon_color.


float sun_angle_max = 30.0 🔗

  • void set_sun_angle_max(value: float)

  • float get_sun_angle_max()

Distancia desde el centro del sol donde se desvanece completamente.


float sun_curve = 0.15 🔗

  • void set_sun_curve(value: float)

  • float get_sun_curve()

La rapidez con la que el sol se desvanece entre el borde del disco solar y sun_angle_max.


bool use_debanding = true 🔗

  • void set_use_debanding(value: bool)

  • bool get_use_debanding()

Si es true, activa la reducción de bandas. La reducción de bandas añade una pequeña cantidad de ruido que ayuda a reducir las bandas que aparecen por los cambios suaves de color en el cielo.