Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
ProceduralSky¶
Inherits: Sky < Resource < Reference < Object
Type of Sky that is generated procedurally based on user input parameters.
Descripción¶
ProceduralSky 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 ProceduralSky is updated on the CPU after the parameters change. It is stored in a texture and then displayed as a background in the scene. This makes it relatively unsuitable for real-time updates during gameplay. However, with a small enough texture size, it can still be updated relatively frequently, as it is updated on a background thread when multi-threading is available.
Propiedades¶
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
Enumeraciones¶
enum TextureSize:
TEXTURE_SIZE_256 = 0 --- Sky texture will be 256x128.
TEXTURE_SIZE_512 = 1 --- Sky texture will be 512x256.
TEXTURE_SIZE_1024 = 2 --- Sky texture will be 1024x512. This is the default size.
TEXTURE_SIZE_2048 = 3 --- Sky texture will be 2048x1024.
TEXTURE_SIZE_4096 = 4 --- Sky texture will be 4096x2048.
TEXTURE_SIZE_MAX = 5 --- Represents the size of the TextureSize enum.
Descripciones de Propiedades¶
Color ground_bottom_color
Default |
|
Setter |
set_ground_bottom_color(value) |
Getter |
get_ground_bottom_color() |
Color of the ground at the bottom.
float ground_curve
Default |
|
Setter |
set_ground_curve(value) |
Getter |
get_ground_curve() |
Qué tan rápido se desvanece el ground_horizon_color en el ground_bottom_color.
float ground_energy
Default |
|
Setter |
set_ground_energy(value) |
Getter |
get_ground_energy() |
Cantidad de contribución de energía desde el suelo.
Color ground_horizon_color
Default |
|
Setter |
set_ground_horizon_color(value) |
Getter |
get_ground_horizon_color() |
Color of the ground at the horizon.
float sky_curve
Default |
|
Setter |
set_sky_curve(value) |
Getter |
get_sky_curve() |
La rapidez con la que el sky_horizon_color se desvanece en el sky_top_color.
float sky_energy
Default |
|
Setter |
set_sky_energy(value) |
Getter |
get_sky_energy() |
Cantidad de contribución de energía del cielo.
Color sky_horizon_color
Default |
|
Setter |
set_sky_horizon_color(value) |
Getter |
get_sky_horizon_color() |
Color of the sky at the horizon.
Color sky_top_color
Default |
|
Setter |
set_sky_top_color(value) |
Getter |
get_sky_top_color() |
Color of the sky at the top.
float sun_angle_max
Default |
|
Setter |
set_sun_angle_max(value) |
Getter |
get_sun_angle_max() |
Distancia desde el centro del sol donde se desvanece completamente.
float sun_angle_min
Default |
|
Setter |
set_sun_angle_min(value) |
Getter |
get_sun_angle_min() |
Distance from sun where it goes from solid to starting to fade.
Color sun_color
Default |
|
Setter |
set_sun_color(value) |
Getter |
get_sun_color() |
The sun's color.
float sun_curve
Default |
|
Setter |
set_sun_curve(value) |
Getter |
get_sun_curve() |
How quickly the sun fades away between sun_angle_min and sun_angle_max.
float sun_energy
Default |
|
Setter |
set_sun_energy(value) |
Getter |
get_sun_energy() |
Amount of energy contribution from the sun.
float sun_latitude
Default |
|
Setter |
set_sun_latitude(value) |
Getter |
get_sun_latitude() |
The sun's height using polar coordinates.
float sun_longitude
Default |
|
Setter |
set_sun_longitude(value) |
Getter |
get_sun_longitude() |
The direction of the sun using polar coordinates.
TextureSize texture_size
Default |
|
Setter |
set_texture_size(value) |
Getter |
get_texture_size() |
Size of Texture that the ProceduralSky will generate. The size is set using TextureSize.