PhysicalSkyMaterial
A material that defines a sky for a Sky resource by a set of physical properties.
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.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Constructors1
PhysicalSkyMaterialConstructor
public PhysicalSkyMaterial();Properties11
EnergyMultiplierProperty
public float EnergyMultiplier { get; set; }The sky's overall brightness multiplier. Higher values result in a brighter sky.
GroundColorProperty
public Color GroundColor { get; set; }Modulates the Color on the bottom half of the sky to represent the ground.
MieCoefficientProperty
public float MieCoefficient { get; set; }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.
MieColorProperty
public Color MieColor { get; set; }Controls the Color of the Mie scattering effect. While not physically accurate, this allows for the creation of alien-looking planets.
MieEccentricityProperty
public float MieEccentricity { get; set; }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.
NightSkyProperty
public Texture2D NightSky { get; set; }Texture2D for the night sky. This is added to the sky, so if it is bright enough, it may be visible during the day.
RayleighCoefficientProperty
public float RayleighCoefficient { get; set; }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.
RayleighColorProperty
public Color RayleighColor { get; set; }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.
SunDiskScaleProperty
public float SunDiskScale { get; set; }Sets the size of the sun disk. Default value is based on Sol's perceived size from Earth.
TurbidityProperty
public float Turbidity { get; set; }Sets the thickness of the atmosphere. High turbidity creates a foggy-looking atmosphere, while a low turbidity results in a clearer atmosphere.
UseDebandingProperty
public bool UseDebanding { get; set; }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.
Methods22
GetEnergyMultiplierfloat
public float GetEnergyMultiplier();floatGetGroundColorColor
public Color GetGroundColor();ColorGetMieCoefficientfloat
public float GetMieCoefficient();floatGetMieColorColor
public Color GetMieColor();ColorGetMieEccentricityfloat
public float GetMieEccentricity();floatGetNightSkyTexture2D
public Texture2D GetNightSky();Texture2DGetRayleighCoefficientfloat
public float GetRayleighCoefficient();floatGetRayleighColorColor
public Color GetRayleighColor();ColorGetSunDiskScalefloat
public float GetSunDiskScale();floatGetTurbidityfloat
public float GetTurbidity();floatGetUseDebandingbool
public bool GetUseDebanding();boolSetEnergyMultipliervoid
public void SetEnergyMultiplier(float multiplier);| Name | Type | Default |
|---|---|---|
multiplier | float | — |
SetGroundColorvoid
public void SetGroundColor(Color color);| Name | Type | Default |
|---|---|---|
color | Color | — |
SetMieCoefficientvoid
public void SetMieCoefficient(float mie);| Name | Type | Default |
|---|---|---|
mie | float | — |
SetMieColorvoid
public void SetMieColor(Color color);| Name | Type | Default |
|---|---|---|
color | Color | — |
SetMieEccentricityvoid
public void SetMieEccentricity(float eccentricity);| Name | Type | Default |
|---|---|---|
eccentricity | float | — |
SetNightSkyvoid
public void SetNightSky(Texture2D nightSky);| Name | Type | Default |
|---|---|---|
nightSky | Texture2D | — |
SetRayleighCoefficientvoid
public void SetRayleighCoefficient(float rayleigh);| Name | Type | Default |
|---|---|---|
rayleigh | float | — |
SetRayleighColorvoid
public void SetRayleighColor(Color color);| Name | Type | Default |
|---|---|---|
color | Color | — |
SetSunDiskScalevoid
public void SetSunDiskScale(float scale);| Name | Type | Default |
|---|---|---|
scale | float | — |
SetTurbidityvoid
public void SetTurbidity(float turbidity);| Name | Type | Default |
|---|---|---|
turbidity | float | — |
SetUseDebandingvoid
public void SetUseDebanding(bool useDebanding);| Name | Type | Default |
|---|---|---|
useDebanding | bool | — |