ProceduralSkyMaterial
A material that defines a simple sky for a Sky resource.
A material that defines a simple sky for a Sky resource.
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 defined by a main color, a color at the horizon, and an easing curve to interpolate between them. Suns are described by a position in the sky, a color, and a max angle from the sun at which the easing curve ends. The max angle therefore defines the size of the sun in the sky.
ProceduralSkyMaterial supports up to 4 suns, using the color, and energy, direction, and angular distance of the first four DirectionalLight3D nodes in the scene. This means that the suns are defined individually by the properties of their corresponding DirectionalLight3Ds and globally by ProceduralSkyMaterial.SunAngleMax and ProceduralSkyMaterial.SunCurve.
ProceduralSkyMaterial uses a lightweight shader to draw the sky and is therefore suited for real-time updates. This makes it a great option for a sky that is simple and computationally cheap, but unrealistic. If you need a more realistic procedural option, use PhysicalSkyMaterial.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Constructors1
ProceduralSkyMaterialConstructor
public ProceduralSkyMaterial();Properties14
EnergyMultiplierProperty
public float EnergyMultiplier { get; set; }The sky's overall brightness multiplier. Higher values result in a brighter sky.
GroundBottomColorProperty
public Color GroundBottomColor { get; set; }Color of the ground at the bottom. Blends with ProceduralSkyMaterial.GroundHorizonColor.
GroundCurveProperty
public float GroundCurve { get; set; }How quickly the ProceduralSkyMaterial.GroundHorizonColor fades into the ProceduralSkyMaterial.GroundBottomColor.
GroundEnergyMultiplierProperty
public float GroundEnergyMultiplier { get; set; }Multiplier for ground color. A higher value will make the ground brighter.
GroundHorizonColorProperty
public Color GroundHorizonColor { get; set; }Color of the ground at the horizon. Blends with ProceduralSkyMaterial.GroundBottomColor.
SkyCoverProperty
public Texture2D SkyCover { get; set; }The sky cover texture to use. This texture must use an equirectangular projection (similar to PanoramaSkyMaterial). The texture's colors will be added to the existing sky color, and will be multiplied by ProceduralSkyMaterial.SkyEnergyMultiplier and ProceduralSkyMaterial.SkyCoverModulate. This is mainly suited to displaying stars at night, but it can also be used to display clouds at day or night (with a non-physically-accurate look).
SkyCoverModulateProperty
public Color SkyCoverModulate { get; set; }The tint to apply to the ProceduralSkyMaterial.SkyCover texture. This can be used to change the sky cover's colors or opacity independently of the sky energy, which is useful for day/night or weather transitions. Only effective if a texture is defined in ProceduralSkyMaterial.SkyCover.
SkyCurveProperty
public float SkyCurve { get; set; }How quickly the ProceduralSkyMaterial.SkyHorizonColor fades into the ProceduralSkyMaterial.SkyTopColor.
SkyEnergyMultiplierProperty
public float SkyEnergyMultiplier { get; set; }Multiplier for sky color. A higher value will make the sky brighter.
SkyHorizonColorProperty
public Color SkyHorizonColor { get; set; }Color of the sky at the horizon. Blends with ProceduralSkyMaterial.SkyTopColor.
SkyTopColorProperty
public Color SkyTopColor { get; set; }Color of the sky at the top. Blends with ProceduralSkyMaterial.SkyHorizonColor.
SunAngleMaxProperty
public float SunAngleMax { get; set; }Distance from center of sun where it fades out completely.
SunCurveProperty
public float SunCurve { get; set; }How quickly the sun fades away between the edge of the sun disk and ProceduralSkyMaterial.SunAngleMax.
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.
Methods28
GetEnergyMultiplierfloat
public float GetEnergyMultiplier();floatGetGroundBottomColorColor
public Color GetGroundBottomColor();ColorGetGroundCurvefloat
public float GetGroundCurve();floatGetGroundEnergyMultiplierfloat
public float GetGroundEnergyMultiplier();floatGetGroundHorizonColorColor
public Color GetGroundHorizonColor();ColorGetSkyCoverTexture2D
public Texture2D GetSkyCover();Texture2DGetSkyCoverModulateColor
public Color GetSkyCoverModulate();ColorGetSkyCurvefloat
public float GetSkyCurve();floatGetSkyEnergyMultiplierfloat
public float GetSkyEnergyMultiplier();floatGetSkyHorizonColorColor
public Color GetSkyHorizonColor();ColorGetSkyTopColorColor
public Color GetSkyTopColor();ColorGetSunAngleMaxfloat
public float GetSunAngleMax();floatGetSunCurvefloat
public float GetSunCurve();floatGetUseDebandingbool
public bool GetUseDebanding();boolSetEnergyMultipliervoid
public void SetEnergyMultiplier(float multiplier);| Name | Type | Default |
|---|---|---|
multiplier | float | — |
SetGroundBottomColorvoid
public void SetGroundBottomColor(Color color);| Name | Type | Default |
|---|---|---|
color | Color | — |
SetGroundCurvevoid
public void SetGroundCurve(float curve);| Name | Type | Default |
|---|---|---|
curve | float | — |
SetGroundEnergyMultipliervoid
public void SetGroundEnergyMultiplier(float energy);| Name | Type | Default |
|---|---|---|
energy | float | — |
SetGroundHorizonColorvoid
public void SetGroundHorizonColor(Color color);| Name | Type | Default |
|---|---|---|
color | Color | — |
SetSkyCovervoid
public void SetSkyCover(Texture2D skyCover);| Name | Type | Default |
|---|---|---|
skyCover | Texture2D | — |
SetSkyCoverModulatevoid
public void SetSkyCoverModulate(Color color);| Name | Type | Default |
|---|---|---|
color | Color | — |
SetSkyCurvevoid
public void SetSkyCurve(float curve);| Name | Type | Default |
|---|---|---|
curve | float | — |
SetSkyEnergyMultipliervoid
public void SetSkyEnergyMultiplier(float multiplier);| Name | Type | Default |
|---|---|---|
multiplier | float | — |
SetSkyHorizonColorvoid
public void SetSkyHorizonColor(Color color);| Name | Type | Default |
|---|---|---|
color | Color | — |
SetSkyTopColorvoid
public void SetSkyTopColor(Color color);| Name | Type | Default |
|---|---|---|
color | Color | — |
SetSunAngleMaxvoid
public void SetSunAngleMax(float degrees);| Name | Type | Default |
|---|---|---|
degrees | float | — |
SetSunCurvevoid
public void SetSunCurve(float curve);| Name | Type | Default |
|---|---|---|
curve | float | — |
SetUseDebandingvoid
public void SetUseDebanding(bool useDebanding);| Name | Type | Default |
|---|---|---|
useDebanding | bool | — |