Class ExponentialHeightFog
Used to create fogging effects such as clouds but with a density that is related to the height of the fog.
Namespace: FlaxEngine
Assembly: FlaxEngine.CSharp.dll
Syntax
[ActorContextMenu("New/Visuals/Exponential Height Fog")]
[ActorToolbox("Visuals")]
[Unmanaged]
public class ExponentialHeightFog : Actor, ISerializable
Constructors
ExponentialHeightFog()
Properties
DirectionalInscatteringColor
Controls the color of the directional inscattering, which is used to approximate inscattering from a directional light. Note: there must be a directional light enabled for DirectionalInscattering to be used.
Declaration
[EditorOrder(230)]
[EditorDisplay("Directional Inscattering", "Color")]
[Unmanaged]
public Color DirectionalInscatteringColor { get; set; }
Property Value
Color
|
DirectionalInscatteringExponent
Controls the size of the directional inscattering cone, which is used to approximate inscattering from a directional light. Note: there must be a directional light enabled for DirectionalInscattering to be used. Range: 2-64.
Declaration
[EditorOrder(210)]
[Limit(2F, 64F, 0.1F)]
[EditorDisplay("Directional Inscattering", "Exponent")]
[Unmanaged]
public float DirectionalInscatteringExponent { get; set; }
Property Value
System.Single
|
DirectionalInscatteringLight
Directional light used for Directional Inscattering.
Declaration
[EditorOrder(200)]
[EditorDisplay("Directional Inscattering", "Light")]
[Unmanaged]
public DirectionalLight DirectionalInscatteringLight { get; set; }
Property Value
DirectionalLight
|
DirectionalInscatteringStartDistance
Controls the start distance from the viewer of the directional inscattering, which is used to approximate inscattering from a directional light. Note: there must be a directional light enabled for DirectionalInscattering to be used.
Declaration
[EditorOrder(220)]
[Limit(0F, 3.40282347E+38F, 1F)]
[EditorDisplay("Directional Inscattering", "Start Distance")]
[Unmanaged]
public float DirectionalInscatteringStartDistance { get; set; }
Property Value
System.Single
|
FogCutoffDistance
Scene elements past this distance will not have fog applied. This is useful for excluding skyboxes which already have fog baked in. Setting this value to 0 disables it.
Declaration
[EditorOrder(60)]
[Limit(0F, 3.40282347E+38F, 1F)]
[EditorDisplay("Exponential Height Fog", null)]
[Unmanaged]
public float FogCutoffDistance { get; set; }
Property Value
System.Single
|
FogDensity
The fog density factor.
Declaration
[EditorOrder(10)]
[Limit(1E-07F, 100F, 0.001F)]
[EditorDisplay("Exponential Height Fog", null)]
[Unmanaged]
public float FogDensity { get; set; }
Property Value
System.Single
|
FogHeightFalloff
The fog height density factor that controls how the density increases as height decreases. Smaller values produce a more visible transition layer.
Declaration
[EditorOrder(20)]
[Limit(0.0001F, 10F, 0.001F)]
[EditorDisplay("Exponential Height Fog", null)]
[Unmanaged]
public float FogHeightFalloff { get; set; }
Property Value
System.Single
|
FogInscatteringColor
Color of the fog.
Declaration
[EditorOrder(30)]
[EditorDisplay("Exponential Height Fog", null)]
[Unmanaged]
public Color FogInscatteringColor { get; set; }
Property Value
Color
|
FogMaxOpacity
Maximum opacity of the fog. A value of 1 means the fog can become fully opaque at a distance and replace scene color completely. A value of 0 means the fog color will not be factored in at all.
Declaration
[EditorOrder(40)]
[Limit(0F, 1F, 0.001F)]
[EditorDisplay("Exponential Height Fog", null)]
[Unmanaged]
public float FogMaxOpacity { get; set; }
Property Value
System.Single
|
StartDistance
Distance from the camera that the fog will start, in world units.
Declaration
[EditorOrder(50)]
[Limit(0F, 3.40282347E+38F, 1F)]
[EditorDisplay("Exponential Height Fog", null)]
[Unmanaged]
public float StartDistance { get; set; }
Property Value
System.Single
|
VolumetricFogAlbedo
The height fog particle reflectiveness used by volumetric fog. Water particles in air have an albedo near white, while dust has slightly darker value.
Declaration
[EditorOrder(320)]
[EditorDisplay("Volumetric Fog", "Albedo")]
[Unmanaged]
public Color VolumetricFogAlbedo { get; set; }
Property Value
Color
|
VolumetricFogDistance
Distance over which volumetric fog should be computed. Larger values extend the effect into the distance but expose under-sampling artifacts in details.
Declaration
[EditorOrder(350)]
[Limit(0F, 3.40282347E+38F, 1F)]
[EditorDisplay("Volumetric Fog", "Distance")]
[Unmanaged]
public float VolumetricFogDistance { get; set; }
Property Value
System.Single
|
VolumetricFogEmissive
Light emitted by height fog. This is a density value so more light is emitted the further you are looking through the fog. In most cases using a Skylight is a better choice, however, it may be useful in certain scenarios.
Declaration
[EditorOrder(330)]
[EditorDisplay("Volumetric Fog", "Emissive")]
[Unmanaged]
public Color VolumetricFogEmissive { get; set; }
Property Value
Color
|
VolumetricFogEnable
Whether to enable Volumetric fog. Graphics quality settings control the resolution of the fog simulation.
Declaration
[EditorOrder(300)]
[EditorDisplay("Volumetric Fog", "Enable")]
[Unmanaged]
public bool VolumetricFogEnable { get; set; }
Property Value
System.Boolean
|
VolumetricFogExtinctionScale
Scales the height fog particle extinction amount used by volumetric fog. Values larger than 1 cause fog particles everywhere absorb more light. Range: 0.1-10.
Declaration
[EditorOrder(340)]
[Limit(0.1F, 10F, 0.1F)]
[EditorDisplay("Volumetric Fog", "Extinction Scale")]
[Unmanaged]
public float VolumetricFogExtinctionScale { get; set; }
Property Value
System.Single
|
VolumetricFogScatteringDistribution
Controls the scattering phase function - how much incoming light scatters in various directions. A distribution value of 0 scatters equally in all directions, while 0.9 scatters predominantly in the light direction. In order to have visible volumetric fog light shafts from the side, the distribution will need to be closer to 0. Range: -0.9-0.9.
Declaration
[EditorOrder(310)]
[Limit(-0.9F, 0.9F, 0.001F)]
[EditorDisplay("Volumetric Fog", "Scattering Distribution")]
[Unmanaged]
public float VolumetricFogScatteringDistribution { get; set; }
Property Value
System.Single
|