Up to date

This page is up to date for Godot 4.2. If you still find outdated information, please open an issue.

PhysicalSkyMaterial

Inherits: Material < Resource < RefCounted < Object

A material that defines a sky for a Sky resource by a set of physical properties.

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 DirectionalLight3D 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

energy_multiplier

1.0

Color

ground_color

Color(0.1, 0.07, 0.034, 1)

float

mie_coefficient

0.005

Color

mie_color

Color(0.69, 0.729, 0.812, 1)

float

mie_eccentricity

0.8

Texture2D

night_sky

float

rayleigh_coefficient

2.0

Color

rayleigh_color

Color(0.3, 0.405, 0.6, 1)

float

sun_disk_scale

1.0

float

turbidity

10.0

bool

use_debanding

true


Property Descriptions

float energy_multiplier = 1.0

  • void set_energy_multiplier ( float value )

  • float get_energy_multiplier ( )

The sky's overall brightness multiplier. Higher values result in a brighter sky.


Color ground_color = Color(0.1, 0.07, 0.034, 1)

  • void set_ground_color ( Color value