Ambient Light

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Lonesome Ducky
Competition winner
Posts: 1123
Joined: Sun Jun 10, 2007 11:14 pm

Ambient Light

Post by Lonesome Ducky »

Is there any way to create ambient light in irrlicht 1.3.1?
skelli
Posts: 20
Joined: Sat Jul 07, 2007 7:07 pm

Post by skelli »

this should work, change the values around to get your desired effect

Code: Select all

 smgr->setAmbientLight(video::SColor(0,90,75,90));  
also to set up a light this might be useful

Code: Select all

smgr->addLightSceneNode  ( node = 0,   core::vector3df(3, 5, 2),  
   video::SColorf(1.4f, 1.0f, 1.0f),  
  300.0f, 
  -1 );    
again mess around with the values, the fourth value is the radius ie how wide you want the light

hope that helps :D
Lonesome Ducky
Competition winner
Posts: 1123
Joined: Sun Jun 10, 2007 11:14 pm

Post by Lonesome Ducky »

OH thanks! I was looking at the API under light scene node, no wonder i couldn't find it :D
Also is it possible to set the ambient light values to negatives?
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

No negative values. It's just a color.
Post Reply