PhysicalSkyMaterial
继承: Material
< Resource
< RefCounted
< Object
A material that defines a sky for a Sky
resource by a set of physical properties.
描述
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.
属性
属性说明
float
energy_multiplier = 1.0
The sky's overall brightness multiplier. Higher values result in a brighter sky.
Color
ground_color = Color(0.1, 0.07, 0.034, 1)
Modulates the Color
on the bottom half of the sky to represent the ground.
float
mie_coefficient = 0.005
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 whitish color around the sun and horizon.
Color
mie_color = Color(0.69, 0.729, 0.812, 1)
Controls the Color
of the Mie scattering effect. While not physically accurate, this allows for the creation of alien-looking planets.
float
mie_eccentricity = 0.8
Controls the direction of the Mie scattering. A value of 1
means that when light hits a particle it's passing through straight forward. A value of -1
means that all light is scatter backwards.
Texture2D
night_sky
Texture2D
for the night sky. This is added to the sky, so if it is bright enough, it may be visible during the day.
float
rayleigh_coefficient = 2.0
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.
Color
rayleigh_color = Color(0.3, 0.405, 0.6, 1)
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.
float
sun_disk_scale = 1.0
Sets the size of the sun disk. Default value is based on Sol's perceived size from Earth.
float
turbidity = 10.0
Sets the thickness of the atmosphere. High turbidity creates a foggy-looking atmosphere, while a low turbidity results in a clearer atmosphere.
bool
use_debanding = true
If true
, enables debanding. Debanding adds a small amount of noise which helps reduce banding that appears from the smooth changes in color in the sky.
本方法通常需要用户覆盖才能生效。
本方法无副作用,不会修改该实例的任何成员变量。
本方法除了能接受在此处描述的参数外,还能够继续接受任意数量的参数。
本方法用于构造某个类型。
调用本方法无需实例,可直接使用类名进行调用。
本方法描述的是使用本类型作为左操作数的有效运算符。
这个值是由下列位标志构成位掩码的整数。
无返回值。