2017-09-12 20:42:36 +00:00
<?xml version="1.0" encoding="UTF-8" ?>
2019-04-25 12:00:31 +00:00
<class name= "ProceduralSky" inherits= "Sky" category= "Core" version= "3.1.1" >
2017-09-12 20:42:36 +00:00
<brief_description >
2018-05-14 06:20:03 +00:00
Type of [Sky] that is generated procedurally based on user input parameters.
2017-09-12 20:42:36 +00:00
</brief_description>
<description >
2018-05-14 06:20:03 +00:00
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.
2018-09-13 01:38:39 +00:00
The ProceduralSky is updated on the CPU after the parameters change and stored in a texture and then displayed as a background in the scene. This makes it relatively unsuitable for realtime updates during gameplay. But with a small texture size it is still feasible to update relatively frequently because it is updated on a background thread when multi-threading is available.
2017-09-12 20:42:36 +00:00
</description>
<tutorials >
</tutorials>
<methods >
</methods>
<members >
2017-09-13 06:49:40 +00:00
<member name= "ground_bottom_color" type= "Color" setter= "set_ground_bottom_color" getter= "get_ground_bottom_color" >
2018-05-14 06:20:03 +00:00
Color of the ground at the bottom.
2017-09-12 20:42:36 +00:00
</member>
2017-09-13 06:49:40 +00:00
<member name= "ground_curve" type= "float" setter= "set_ground_curve" getter= "get_ground_curve" >
2018-05-14 06:20:03 +00:00
How quickly the [member ground_horizon_color] fades into the [member ground_bottom_color].
2017-09-12 20:42:36 +00:00
</member>
2017-09-13 06:49:40 +00:00
<member name= "ground_energy" type= "float" setter= "set_ground_energy" getter= "get_ground_energy" >
2018-05-14 06:20:03 +00:00
Amount of energy contribution from the ground.
2017-09-12 20:42:36 +00:00
</member>
2017-09-13 06:49:40 +00:00
<member name= "ground_horizon_color" type= "Color" setter= "set_ground_horizon_color" getter= "get_ground_horizon_color" >
2018-05-14 06:20:03 +00:00
Color of the ground at the horizon.
2017-09-12 20:42:36 +00:00
</member>
2017-09-13 06:49:40 +00:00
<member name= "sky_curve" type= "float" setter= "set_sky_curve" getter= "get_sky_curve" >
2018-05-14 06:20:03 +00:00
How quickly the [member sky_horizon_color] fades into the [member sky_top_color].
2017-09-12 20:42:36 +00:00
</member>
2017-09-13 06:49:40 +00:00
<member name= "sky_energy" type= "float" setter= "set_sky_energy" getter= "get_sky_energy" >
2018-05-14 06:20:03 +00:00
Amount of energy contribution from the sky.
2017-09-12 20:42:36 +00:00
</member>
2017-09-13 06:49:40 +00:00
<member name= "sky_horizon_color" type= "Color" setter= "set_sky_horizon_color" getter= "get_sky_horizon_color" >
2018-05-14 06:20:03 +00:00
Color of the sky at the horizon.
2017-09-12 20:42:36 +00:00
</member>
2017-09-13 06:49:40 +00:00
<member name= "sky_top_color" type= "Color" setter= "set_sky_top_color" getter= "get_sky_top_color" >
2018-05-14 06:20:03 +00:00
Color of the sky at the top.
2017-09-12 20:42:36 +00:00
</member>
2017-09-13 06:49:40 +00:00
<member name= "sun_angle_max" type= "float" setter= "set_sun_angle_max" getter= "get_sun_angle_max" >
2018-05-14 06:20:03 +00:00
Distance from center of sun where it fades out completely.
2017-09-12 20:42:36 +00:00
</member>
2017-09-13 06:49:40 +00:00
<member name= "sun_angle_min" type= "float" setter= "set_sun_angle_min" getter= "get_sun_angle_min" >
2018-05-14 06:20:03 +00:00
Distance from sun where it goes from solid to starting to fade.
2017-09-12 20:42:36 +00:00
</member>
2017-09-13 06:49:40 +00:00
<member name= "sun_color" type= "Color" setter= "set_sun_color" getter= "get_sun_color" >
2018-05-14 06:20:03 +00:00
Color of the sun.
2017-09-12 20:42:36 +00:00
</member>
2017-09-13 06:49:40 +00:00
<member name= "sun_curve" type= "float" setter= "set_sun_curve" getter= "get_sun_curve" >
2018-05-14 06:20:03 +00:00
How quickly the sun fades away between [member sun_angle_min] and [member sun_angle_max]
2017-09-12 20:42:36 +00:00
</member>
2017-09-13 06:49:40 +00:00
<member name= "sun_energy" type= "float" setter= "set_sun_energy" getter= "get_sun_energy" >
2018-05-14 06:20:03 +00:00
Amount of energy contribution from the sun.
2017-09-12 20:42:36 +00:00
</member>
2017-09-13 06:49:40 +00:00
<member name= "sun_latitude" type= "float" setter= "set_sun_latitude" getter= "get_sun_latitude" >
2018-05-28 12:53:15 +00:00
The suns height using polar coordinates.
2017-09-12 20:42:36 +00:00
</member>
2017-09-13 06:49:40 +00:00
<member name= "sun_longitude" type= "float" setter= "set_sun_longitude" getter= "get_sun_longitude" >
2018-05-14 06:20:03 +00:00
The direction of the sun using polar coordinates.
2017-09-12 20:42:36 +00:00
</member>
2017-09-13 06:49:40 +00:00
<member name= "texture_size" type= "int" setter= "set_texture_size" getter= "get_texture_size" enum= "ProceduralSky.TextureSize" >
2018-05-14 06:20:03 +00:00
Size of [Texture] that the ProceduralSky will generate.
2017-09-12 20:42:36 +00:00
</member>
</members>
<constants >
2017-11-24 22:16:30 +00:00
<constant name= "TEXTURE_SIZE_256" value= "0" enum= "TextureSize" >
2017-09-12 20:42:36 +00:00
</constant>
2017-11-24 22:16:30 +00:00
<constant name= "TEXTURE_SIZE_512" value= "1" enum= "TextureSize" >
2017-09-12 20:42:36 +00:00
</constant>
2017-11-24 22:16:30 +00:00
<constant name= "TEXTURE_SIZE_1024" value= "2" enum= "TextureSize" >
2017-09-12 20:42:36 +00:00
</constant>
2017-11-24 22:16:30 +00:00
<constant name= "TEXTURE_SIZE_2048" value= "3" enum= "TextureSize" >
2017-09-12 20:42:36 +00:00
</constant>
2017-11-24 22:16:30 +00:00
<constant name= "TEXTURE_SIZE_4096" value= "4" enum= "TextureSize" >
2017-09-12 20:42:36 +00:00
</constant>
2017-11-24 22:16:30 +00:00
<constant name= "TEXTURE_SIZE_MAX" value= "5" enum= "TextureSize" >
2017-09-12 20:42:36 +00:00
</constant>
</constants>
</class>