Inherits: Material < Resource < Reference < Object

A Material used with Sky to generate a background based on user input parameters.


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 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 ProceduralSkyMaterial uses a lightweight shader to draw the sky and is thus suited for real time updates. When you do not need a quick sky that is not realistic, this is a good option.

The ProceduralSkyMaterial supports up to 4 suns. Each sun takes its color, energy, and direction from the corresponding DirectionalLight in the scene.


Color ground_bottom_color Color( 0.12, 0.12, 0.13, 1 )
float ground_curve 0.02
float ground_energy 1.0
Color ground_horizon_color Color( 0.37, 0.33, 0.31, 1 )
float sky_curve 0.09
float sky_energy 1.0
Color sky_horizon_color Color( 0.55, 0.69, 0.81, 1 )
Color sky_top_color Color( 0.35, 0.46, 0.71, 1 )
float sun_angle_max 100.0
float sun_angle_min 1.0
float sun_curve 0.05

Property Descriptions

  • Color ground_bottom_color
Default Color( 0.12, 0.12, 0.13, 1 )
Setter set_ground_bottom_color(value)
Getter get_ground_bottom_color()

Color of the ground at the bottom. Blends with ground_horizon_color.

Default 0.02
Setter set_ground_curve(value)
Getter get_ground_curve()

How quickly the ground_horizon_color fades into the ground_bottom_color.

Default 1.0
Setter set_ground_energy(value)
Getter get_ground_energy()

Amount of energy contribution from the ground.

  • Color ground_horizon_color
Default Color( 0.37, 0.33, 0.31, 1 )
Setter set_ground_horizon_color(value)
Getter get_ground_horizon_color()

Color of the ground at the horizon. Blends with ground_bottom_color.

Default 0.09
Setter set_sky_curve(value)
Getter get_sky_curve()

How quickly the sky_horizon_color fades into the sky_top_color.

Default 1.0
Setter set_sky_energy(value)
Getter get_sky_energy()

Amount of energy contribution from the sky.

  • Color sky_horizon_color
Default Color( 0.55, 0.69, 0.81, 1 )
Setter set_sky_horizon_color(value)
Getter get_sky_horizon_color()

Color of the sky at the horizon. Blends with sky_top_color.

Default Color( 0.35, 0.46, 0.71, 1 )
Setter set_sky_top_color(value)
Getter get_sky_top_color()

Color of the sky at the top. Blends with sky_horizon_color.

Default 100.0
Setter set_sun_angle_max(value)
Getter get_sun_angle_max()

Distance from center of sun where it fades out completely.

Default 1.0
Setter set_sun_angle_min(value)
Getter get_sun_angle_min()

Distance from sun where it goes from solid to starting to fade.

Default 0.05
Setter set_sun_curve(value)
Getter get_sun_curve()

How quickly the sun fades away between sun_angle_min and sun_angle_max.