Skip to content
0.2.0-dev Download ZIP
57 lines ·5.1 KB Raw
1<?xml version="1.0" encoding="UTF-8" ?>
2<class name="ProceduralSkyMaterial" inherits="Material" api_type="core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
3 <brief_description>
4 A material that defines a simple sky for a [Sky] resource.
5 </brief_description>
6 <description>
7 [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.
8 [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 [DirectionalLight3D]s and globally by [member sun_angle_max] and [member sun_curve].
9 [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].
10 </description>
11 <tutorials>
12 </tutorials>
13 <members>
14 <member name="energy_multiplier" type="float" setter="set_energy_multiplier" getter="get_energy_multiplier" default="1.0">
15 The sky's overall brightness multiplier. Higher values result in a brighter sky.
16 </member>
17 <member name="ground_bottom_color" type="Color" setter="set_ground_bottom_color" getter="get_ground_bottom_color" default="Color(0.2, 0.169, 0.133, 1)">
18 Color of the ground at the bottom. Blends with [member ground_horizon_color].
19 </member>
20 <member name="ground_curve" type="float" setter="set_ground_curve" getter="get_ground_curve" default="0.02">
21 How quickly the [member ground_horizon_color] fades into the [member ground_bottom_color].
22 </member>
23 <member name="ground_energy_multiplier" type="float" setter="set_ground_energy_multiplier" getter="get_ground_energy_multiplier" default="1.0">
24 Multiplier for ground color. A higher value will make the ground brighter.
25 </member>
26 <member name="ground_horizon_color" type="Color" setter="set_ground_horizon_color" getter="get_ground_horizon_color" default="Color(0.6463, 0.6558, 0.6708, 1)">
27 Color of the ground at the horizon. Blends with [member ground_bottom_color].
28 </member>
29 <member name="sky_cover" type="Texture2D" setter="set_sky_cover" getter="get_sky_cover">
30 The sky cover texture to use. This texture must use an equirectangular projection (similar to [PanoramaSkyMaterial]). The texture's colors will be [i]added[/i] to the existing sky color, and will be multiplied by [member sky_energy_multiplier] and [member sky_cover_modulate]. This is mainly suited to displaying stars at night, but it can also be used to display clouds at day or night (with a non-physically-accurate look).
31 </member>
32 <member name="sky_cover_modulate" type="Color" setter="set_sky_cover_modulate" getter="get_sky_cover_modulate" default="Color(1, 1, 1, 1)">
33 The tint to apply to the [member sky_cover] texture. This can be used to change the sky cover's colors or opacity independently of the sky energy, which is useful for day/night or weather transitions. Only effective if a texture is defined in [member sky_cover].
34 </member>
35 <member name="sky_curve" type="float" setter="set_sky_curve" getter="get_sky_curve" default="0.15">
36 How quickly the [member sky_horizon_color] fades into the [member sky_top_color].
37 </member>
38 <member name="sky_energy_multiplier" type="float" setter="set_sky_energy_multiplier" getter="get_sky_energy_multiplier" default="1.0">
39 Multiplier for sky color. A higher value will make the sky brighter.
40 </member>
41 <member name="sky_horizon_color" type="Color" setter="set_sky_horizon_color" getter="get_sky_horizon_color" default="Color(0.6463, 0.6558, 0.6708, 1)">
42 Color of the sky at the horizon. Blends with [member sky_top_color].
43 </member>
44 <member name="sky_top_color" type="Color" setter="set_sky_top_color" getter="get_sky_top_color" default="Color(0.385, 0.454, 0.55, 1)">
45 Color of the sky at the top. Blends with [member sky_horizon_color].
46 </member>
47 <member name="sun_angle_max" type="float" setter="set_sun_angle_max" getter="get_sun_angle_max" default="30.0">
48 Distance from center of sun where it fades out completely.
49 </member>
50 <member name="sun_curve" type="float" setter="set_sun_curve" getter="get_sun_curve" default="0.15">
51 How quickly the sun fades away between the edge of the sun disk and [member sun_angle_max].
52 </member>
53 <member name="use_debanding" type="bool" setter="set_use_debanding" getter="get_use_debanding" default="true">
54 If [code]true[/code], enables debanding. Debanding adds a small amount of noise which helps reduce banding that appears from the smooth changes in color in the sky.
55 </member>
56 </members>
57</class>