Function _IrrSetFog

au3Irr2

au3Irr2 Function Reference

_IrrSetFog

Set the properties of fog in the scene

#Include <au3Irrlicht2.au3>
_IrrSetFog($i_Red, $i_Green, $i_Blue, $i_FogType, $f_FogStart, $f_FogEnd, $f_Density = 0.025)

 

Parameters

$i_Red, $i_Green, $i_Blue Define colour of the fog (0-255).
Should be set to the same colour as the scene sky so the scene fogs out nicely into nothing.
$i_FogType Defines how the fog is calculated:
$IRR_LINEAR_FOG - computed as [end - distance / end - start], density value is not used.
$IRR_EXPONENTIAL_FOG - computed as [1 / (2.718^(distance * densitiy))], both start and end values are not used.
$f_FogStart, $f_FogEnd Distances at which the fog starts and at which it reaches its maximum density.
Values are ignored for exponential fog.
$f_Density [optional] Determines how quickly the exponential change takes place, with value from 0 to 1.
Example: A value of 0.025 equals 20% visibility at 50 units distance. Value is ignored for linear fog.

 

Return Value

success: True
failure: False

 

Remarks

None.

 

Related

None.

 

Example


#include "au3Irrlicht2.au3"

_IrrStart()

local $nodeCamera = _IrrAddCamera(10, 10, 10, 0, 0, 0)
local $nodeCube = _IrrAddCubeSceneNode(12)
_IrrSetNodeMaterialTexture( $nodeCube, _IrrGetTexture(".\media\au3irr2_logo.jpg"), 0)
_IrrSetNodeMaterialFlag( $nodeCube, $IRR_EMF_LIGHTING, $IRR_OFF )

_IrrSetNodeMaterialFlag( $nodeCube, $IRR_EMF_FOG_ENABLE, $IRR_ON )
_IrrSetFog ( 100,100,100, $IRR_EXPONENTIAL_FOG, 0.0, 0.0, 0.15)

WHILE _IrrRunning()
    _IrrBeginScene(100, 100, 100)
    _IrrDrawScene()
    _IrrEndScene()
WEND

_IrrStop()