PhysicalSkyMaterial

Inherits: Material < Resource < Reference < Object

Sky Material used for a physically based sky.

Description

The PhysicalSkyMaterial uses the Preetham analytic daylight model to draw a sky based on physical properties. This results in a substantially more realistic sky than the ProceduralSkyMaterial, but it is slightly slower and less flexible.

The PhysicalSkyMaterial only supports one sun. The color, energy, and direction of the sun are taken from the first DirectionalLight in the scene tree.

As it is based on a daylight model, the sky fades to black as the sunset ends. If you want a full day/night cycle, you will have to add a night sky by converting this to a ShaderMaterial and adding a night sky directly into the resulting shader.

Properties

float dither_strength 1.0
float exposure 0.1
Color ground_color Color( 1, 1, 1, 1 )
float mie_coefficient 0.005
Color mie_color Color( 0.36, 0.56, 0.82, 1 )
float mie_eccentricity 0.8
float rayleigh_coefficient 2.0
Color rayleigh_color Color( 0.056, 0.14, 0.3, 1 )
float sun_disk_scale 1.0
float turbidity 10.0

Property Descriptions

Default 1.0
Setter set_dither_strength(value)
Getter get_dither_strength()

Sets the amount of dithering to use. Dithering helps reduce banding that appears from the smooth changes in color in the sky. Use the lowest value possible, higher amounts may add fuzziness to the sky.


Default 0.1
Setter set_exposure(value)
Getter get_exposure()

Sets the exposure of the sky. Higher exposure values make the entire sky brighter.


Default Color( 1, 1, 1, 1 )
Setter set_ground_color(value)
Getter get_ground_color()

Modulates the Color on the bottom half of the sky to represent the ground.


Default 0.005
Setter set_mie_coefficient(value)
Getter get_mie_coefficient()

Controls the strength of mie scattering for the sky. Mie scattering results from light colliding with larger particles (like water). On earth, mie scattering results in a whiteish color around the sun and horizon.


Default Color( 0.36, 0.56, 0.82, 1 )
Setter set_mie_color(value)
Getter get_mie_color()

Controls the Color of the mie scattering effect. While not physically accurate, this allows for the creation of alien looking planets.


Default 0.8
Setter set_mie_eccentricity(value)
Getter get_mie_eccentricity()

Controls the direction of the mie scattering. A value of 1 means that when light hits a particle it passing through straight forward. A value of -1 means that all light is scatter backwards.


  • float rayleigh_coefficient
Default 2.0
Setter set_rayleigh_coefficient(value)
Getter get_rayleigh_coefficient()

Controls the strength of the rayleigh scattering. Rayleigh scattering results from light colliding with small particles. It is responsible for the blue color of the sky.


Default Color( 0.056, 0.14, 0.3, 1 )
Setter set_rayleigh_color(value)
Getter get_rayleigh_color()

Controls the Color of the rayleigh scattering. While not physically accurate, this allows for the creation of alien looking planets. For example, setting this to a red Color results in a mars looking atmosphere with a corresponding blue sunset.


Default 1.0
Setter set_sun_disk_scale(value)
Getter get_sun_disk_scale()

Sets the size of the sun disk. Default value is based on Sol's perceived size from Earth.


Default 10.0
Setter set_turbidity(value)
Getter get_turbidity()

Sets the thickness of the atmosphere. High turbidity creates a foggy looking atmosphere, while a low turbidity results in a clearer atmosphere.