mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2024-12-22 11:56:49 +01:00
85 lines
5.1 KiB
XML
85 lines
5.1 KiB
XML
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<class name="ProceduralSky" inherits="Sky" version="4.2">
|
|
<brief_description>
|
|
Type of [Sky] that is generated procedurally based on user input parameters.
|
|
</brief_description>
|
|
<description>
|
|
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.
|
|
</description>
|
|
<tutorials>
|
|
</tutorials>
|
|
<methods>
|
|
</methods>
|
|
<members>
|
|
<member name="ground_bottom_color" type="Color" setter="set_ground_bottom_color" getter="get_ground_bottom_color" default="Color( 0.156863, 0.184314, 0.211765, 1 )">
|
|
Color of the ground at the bottom.
|
|
</member>
|
|
<member name="ground_curve" type="float" setter="set_ground_curve" getter="get_ground_curve" default="0.02">
|
|
How quickly the [member ground_horizon_color] fades into the [member ground_bottom_color].
|
|
</member>
|
|
<member name="ground_energy" type="float" setter="set_ground_energy" getter="get_ground_energy" default="1.0">
|
|
Amount of energy contribution from the ground.
|
|
</member>
|
|
<member name="ground_horizon_color" type="Color" setter="set_ground_horizon_color" getter="get_ground_horizon_color" default="Color( 0.423529, 0.396078, 0.372549, 1 )">
|
|
Color of the ground at the horizon.
|
|
</member>
|
|
<member name="sky_curve" type="float" setter="set_sky_curve" getter="get_sky_curve" default="0.09">
|
|
How quickly the [member sky_horizon_color] fades into the [member sky_top_color].
|
|
</member>
|
|
<member name="sky_energy" type="float" setter="set_sky_energy" getter="get_sky_energy" default="1.0">
|
|
Amount of energy contribution from the sky.
|
|
</member>
|
|
<member name="sky_horizon_color" type="Color" setter="set_sky_horizon_color" getter="get_sky_horizon_color" default="Color( 0.839216, 0.917647, 0.980392, 1 )">
|
|
Color of the sky at the horizon.
|
|
</member>
|
|
<member name="sky_top_color" type="Color" setter="set_sky_top_color" getter="get_sky_top_color" default="Color( 0.647059, 0.839216, 0.945098, 1 )">
|
|
Color of the sky at the top.
|
|
</member>
|
|
<member name="sun_angle_max" type="float" setter="set_sun_angle_max" getter="get_sun_angle_max" default="100.0">
|
|
Distance from center of sun where it fades out completely.
|
|
</member>
|
|
<member name="sun_angle_min" type="float" setter="set_sun_angle_min" getter="get_sun_angle_min" default="1.0">
|
|
Distance from sun where it goes from solid to starting to fade.
|
|
</member>
|
|
<member name="sun_color" type="Color" setter="set_sun_color" getter="get_sun_color" default="Color( 1, 1, 1, 1 )">
|
|
The sun's color.
|
|
</member>
|
|
<member name="sun_curve" type="float" setter="set_sun_curve" getter="get_sun_curve" default="0.05">
|
|
How quickly the sun fades away between [member sun_angle_min] and [member sun_angle_max].
|
|
</member>
|
|
<member name="sun_energy" type="float" setter="set_sun_energy" getter="get_sun_energy" default="1.0">
|
|
Amount of energy contribution from the sun.
|
|
</member>
|
|
<member name="sun_latitude" type="float" setter="set_sun_latitude" getter="get_sun_latitude" default="35.0">
|
|
The sun's height using polar coordinates.
|
|
</member>
|
|
<member name="sun_longitude" type="float" setter="set_sun_longitude" getter="get_sun_longitude" default="0.0">
|
|
The direction of the sun using polar coordinates.
|
|
</member>
|
|
<member name="texture_size" type="int" setter="set_texture_size" getter="get_texture_size" enum="ProceduralSky.TextureSize" default="2">
|
|
Size of [Texture] that the ProceduralSky will generate. The size is set using [enum TextureSize].
|
|
</member>
|
|
</members>
|
|
<constants>
|
|
<constant name="TEXTURE_SIZE_256" value="0" enum="TextureSize">
|
|
Sky texture will be 256x128.
|
|
</constant>
|
|
<constant name="TEXTURE_SIZE_512" value="1" enum="TextureSize">
|
|
Sky texture will be 512x256.
|
|
</constant>
|
|
<constant name="TEXTURE_SIZE_1024" value="2" enum="TextureSize">
|
|
Sky texture will be 1024x512. This is the default size.
|
|
</constant>
|
|
<constant name="TEXTURE_SIZE_2048" value="3" enum="TextureSize">
|
|
Sky texture will be 2048x1024.
|
|
</constant>
|
|
<constant name="TEXTURE_SIZE_4096" value="4" enum="TextureSize">
|
|
Sky texture will be 4096x2048.
|
|
</constant>
|
|
<constant name="TEXTURE_SIZE_MAX" value="5" enum="TextureSize">
|
|
Represents the size of the [enum TextureSize] enum.
|
|
</constant>
|
|
</constants>
|
|
</class>
|