VolumetricFog

consoledoc.h

Volumetric Fog Object class. Main class defining the Volumetric Fog objects in the scene. Used in conjunction with the VolumetricFogRTManager class which is responsible for the required rendertargets.

More...

VolumetricFogData

assetIdString

The source shape asset.

filename

Path and filename of the model file (.DTS, .DAE) to use for this Volume.

ColorI

Fog color RGBA (Alpha is ignored)

float

Overal fog density value (0 disables the fog).

bool

Set to true if volumetric fog should continue while submerged.

float

Min size (in pixels) for fog to be rendered.

float

Object size in pixels at which the FX-fading kicks in (0 disables fading).

VolumetricFogModulation

filename

A texture which contains Fogdensity modulator in the red channel and color with 1-green channel. No texture disables modulation.

float

How many times the texture is mapped to the object.

float

Overall strength of the density modulation (0 disables modulation).

Point2F

Overall primary speed of the density modulation (x-speed(u) y-speed(v))

Point2F

Overall secundary speed of the density modulation (x-speed(u) y-speed(v))

Reflections

bool

Set to true if volumetric fog should be reflected.

float

Strength of the reflections (0 disables the fog).

PostFX

bool

Set to true if volumetric fog should use glow PostFX.

float

Overall strength of the glow PostFX.

bool

Set to true if volumetric fog should modify the brightness of the Lightrays.

float

Modifier for LightRay PostFX when inside Fog.

Callbacks

void
onEnterFog(SimObjectId obj)

Called when an object enters the volume of the Fog instance.

void
onLeaveFog(SimObjectId obj)

Called when an object left the volume of the Fog instance.

Public Static Attributes

bool

Disables rendering of all instances of this type.

bool

Disables selection of all instances of this type.

Public Functions

bool

returns true if control object is inside the fog

void
SetFogColor(ColorI new_color)

Changes the color of the fog.

void
SetFogColorF(LinearColorF new_color)

Changes the color of the fog.

void
SetFogDensity(float new_density)

Changes the density of the fog.

void
SetFogGlow(bool on_off, float strength)

Changes the glow postfx when inside the fog.

void
SetFogLightray(bool on_off, float strength)

Changes the lightrays postfx when inside the fog.

void
SetFogModulation(float new_strenght, Point2F new_speed1, Point2F new_speed2)

Changes the modulation of the fog.

Detailed Description

Volumetric Fog Object class. Main class defining the Volumetric Fog objects in the scene. Used in conjunction with the VolumetricFogRTManager class which is responsible for the required rendertargets.

Methods (exposed to script): setFogColorF(color) Changes the overall fog color (color.rgba range 0.0 - 1.0). ; setFogColor(color) Changes the overall fog color color.rgba range 0 - 255). ; setFogDensity(density) Changes the overall fog density. setFogModulation(strength, speed1, speed2) changes the strength and the speeds of the 2 animation layers.

Callbacks: onEnterFog triggered whenever the controlobject (Player or Camera) enters the Fog. (current Fog object and the controlobject are exposed to script. onLeaveFog triggered whenever the controlobject (Player or Camera) left the Fog. (current Fog object and the controlobject are exposed to script.

new VolumetricFog()
{
shapeName = "art/environment/FogRCube.dts";
fogColor = "200 200 200 128";
fogDensity = "0.2";
ignoreWater = "0";
MinSize = "250";
FadeSize = "750";
texture = "art/environment/FogMod_heavy.dds";
tiles = "1.5";
modStrength = "0.2";
PrimSpeed = "-0.01 0.04";
SecSpeed = "0.02 -0.02";
position = "748.644 656.371 65.3506"; 
rotation = "0 0 1 20.354";
scale = "40 30 6";
};

VolumetricFogData

assetIdString ShapeAsset 

The source shape asset.

filename shapeName 

Path and filename of the model file (.DTS, .DAE) to use for this Volume.

ColorI fogColor 

Fog color RGBA (Alpha is ignored)

float fogDensity 

Overal fog density value (0 disables the fog).

bool ignoreWater 

Set to true if volumetric fog should continue while submerged.

float MinSize 

Min size (in pixels) for fog to be rendered.

float fadeSize 

Object size in pixels at which the FX-fading kicks in (0 disables fading).

VolumetricFogModulation

filename texture 

A texture which contains Fogdensity modulator in the red channel and color with 1-green channel. No texture disables modulation.

float tiles 

How many times the texture is mapped to the object.

float modStrength 

Overall strength of the density modulation (0 disables modulation).

Point2F PrimSpeed 

Overall primary speed of the density modulation (x-speed(u) y-speed(v))

Point2F SecSpeed 

Overall secundary speed of the density modulation (x-speed(u) y-speed(v))

Reflections

bool Reflectable 

Set to true if volumetric fog should be reflected.

float ReflectStrength 

Strength of the reflections (0 disables the fog).

PostFX

bool useGlow 

Set to true if volumetric fog should use glow PostFX.

float glowStrength 

Overall strength of the glow PostFX.

bool modLightRay 

Set to true if volumetric fog should modify the brightness of the Lightrays.

float lightRayMod 

Modifier for LightRay PostFX when inside Fog.

Callbacks

onEnterFog(SimObjectId obj)

Called when an object enters the volume of the Fog instance.

Parameters:

obj

the controlobject entering the fog.

onLeaveFog(SimObjectId obj)

Called when an object left the volume of the Fog instance.

Parameters:

obj

the controlobject leaving the fog.

Public Static Attributes

bool isRenderable 

Disables rendering of all instances of this type.

bool isSelectable 

Disables selection of all instances of this type.

Public Functions

isInsideFog()

returns true if control object is inside the fog

SetFogColor(ColorI new_color)

Changes the color of the fog.

.@params new_color the new fog color (rgb 0-255, a is ignored.

SetFogColorF(LinearColorF new_color)

Changes the color of the fog.

.@params new_color the new fog color (rgb 0.0 - 1.0, a is ignored.

SetFogDensity(float new_density)

Changes the density of the fog.

.@params new_density the new fog density.

SetFogGlow(bool on_off, float strength)

Changes the glow postfx when inside the fog.

.@params on_off set to true to enable glow. @params strength glow strength.

SetFogLightray(bool on_off, float strength)

Changes the lightrays postfx when inside the fog.

.@params on_off set to true to modification of the lightray postfx. @params strength lightray strength.

SetFogModulation(float new_strenght, Point2F new_speed1, Point2F new_speed2)

Changes the modulation of the fog.

.@params new_strenght the new strength of the modulation. @params new_speed1 the new speed (x y) of the modulation layer 1. @params new_speed2 the new speed (x y) of the modulation layer 2.