Discussion:
Bug? - osg/Light - setting ambient light - blue value has no effect
Frank Güttler
2006-05-09 21:23:12 UTC
Permalink
Hello,



Maybe I have discovered a bug: I like to create a light with the class
Light, then setting the parameters to it, like the ambient value due
light->setAmbient(osg::Vec4()). The Vec4 contains the r,g,b values and w=1.
The blue value hasn’t any effect in our simulation, so the ambient light is
always a little bit brown (only red and green mixed). This is not what I
would like to have, a little bit grey instead of brown.



When I want to check the ambient value of the light through osg::Vec4
light->getAmbient(), I get the right blue value which I set before, but I
don’t see it.



Is this problem already known? How can I fix it?



Thank you in advance,

Frank Güttler.
Farshid Lashkari
2006-05-09 21:45:18 UTC
Permalink
Hi Frank,

OpenGL will scale the ambient color of the light with the ambient
color of the material. Are you sure the blue component of the material
ambient color is not zero?

-Farshid
Frank Güttler
2006-05-10 16:34:50 UTC
Permalink
Hello Farshild,

I will check this, thank you for your hint.

Frank.

-----Ursprüngliche Nachricht-----
Von: osg-users-bounces-O4jvQuzB+***@public.gmane.org
[mailto:osg-users-bounces-O4jvQuzB+***@public.gmane.org] Im Auftrag von Farshid
Lashkari
Gesendet: Dienstag, 9. Mai 2006 23:45
An: osg users
Betreff: Re: [osg-users] Bug? - osg/Light - setting ambient light - blue
valuehas no effect

Hi Frank,

OpenGL will scale the ambient color of the light with the ambient
color of the material. Are you sure the blue component of the material
ambient color is not zero?

-Farshid
_______________________________________________
osg-users mailing list
osg-users-O4jvQuzB+***@public.gmane.org
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Loading...