Function _IrrSetShadowColor

au3Irr2

au3Irr2 Function Reference

_IrrSetShadowColor

Sets the colour of shadows cast by objects in the scene.

#Include <au3Irrlicht2.au3>
_IrrSetShadowColor($i_Alpha, $i_Red, $i_Green, $i_Blue)

 

Parameters

$i_Alpha Alpha blend for the shadow.
Value of 128 would mean a half washed out shadow which gives the appearence of ambient light in the room illuminating the shadowed surface.
$i_Red, $i_Green, $i_Blue Colour values for shadow colour from 0 to 255.

 

Return Value

Success: True
Failure: False

 

Remarks

The shadow colour is a global property for the whole scene (however you can change it when moving into different areas of your scene).
If you are observing a bright scene you might use a light grey shadow instead of a heavy black shadow to add to realism.

 

Related

_IrrAddNodeShadow, _IrrAddLight

 

Example


#include "au3Irrlicht2.au3"

_IrrStart( $IRR_EDT_OPENGL, 800, 600, $IRR_BITS_PER_PIXEL_32, _
        $IRR_WINDOWED, $IRR_SHADOWS, $IRR_IGNORE_EVENTS, $IRR_VERTICAL_SYNC_ON )

local $texture = _IrrGetTexture(".\media\au3irr2_logo.jpg")

local $meshReceive = _IrrAddHillPlaneMesh( "Plane", 8, 8, 1, 1)
local $nodeReceive = _IrrAddMeshToScene( $meshReceive )
_IrrSetNodeMaterialTexture( $nodeReceive, $texture, 0)

local $meshCast = _IrrGetMesh(".\media\sphere.obj")
local $nodeCast = _IrrAddMeshToScene($meshCast)
_IrrSetNodeMaterialTexture( $nodeCast, $texture, 0)
_IrrAddFlyCircleAnimator($nodeCast, 1, 3, 1, 3, 0.0005)

local $nodeLight = _IrrAddLight($IRR_NO_PARENT, 0,50,0, 1,0.1,0.1, 1000.0)
_IrrAddNodeShadow($nodeCast)
_IrrSetShadowColor(128, 255, 0, 0)

local $nodeCamera = _IrrAddCamera(-5,5,-6, 0,0,0 )

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

_IrrStop()