Remember there are two sets of lighting parameters you needs to set: ambient, diffuse, etc material parameters, and ambient, diffuse, etc. light colors. If your diffuse material color is (1,1,1,1) but your diffuse light color is (0.1,0.1,0.1,1) (or vice versa) then you will end up with a dark scene. Cranking the diffuse material color to (255,255,255,1) or even higher might compensate for the dim light color, but you're doing non-standard lighting at that point. Sort of like trying to affect lighting results by scaling the normals. It's allowed, but any other developers who look at your code will scratch their heads and wonder what on Earth you were doing. So, it's best to keep the color components in the range 0..1. -Paul
_____ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jae Whang Sent: Wednesday, March 28, 2007 10:09 PM To: [email protected] Subject: [osg-users] Simple light question Hi everyone. This maybe very simple for most of users here. But I am fairly new to OSG or openGL, so some help would be great. I have been playing with light recently and i know diffuse, ambient etc. attributes are between 0 and 1. However the light was not bright enough and I did not wanted to add extra lights as the Virtual World is very vast, so adding more lights means lots of light. So out of curiosity i made the attributes to 255 and when i rendered the scene the light got a lot brighter than before. and I was wondering what is going on? if i make values to 255 would that be light with value 1(which is maximum from what i know) * 255 or the maximum values is not 1? but another large number? again apology for simple question thanks in advance Jae _____ FREE pop-up blocking with the new MSN Toolbar MSN Toolbar <http://g.msn.com/8HMAEN/2752??PS=47575> Get it now!
_______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
