[osg-users] Problem with lighting when scaled

2009-08-14 Thread David Goering
Hey I am playing arround with the OSG lighting functions, and am fairly new to it all. Anyway I am using OSGART with OSG which shouldnt make a difference. I have a MatrixTransform and its child is PositionAttitudeTransform and its child is a 3d Model. I have lighting as a child of the MatrixTrans

Re: [osg-users] Problem with lighting when scaled

2009-08-14 Thread Ulrich Hertlein
Hi David, On 14/08/09 3:50 PM, David Goering wrote: I scale the PositionAttitudeTransform by (5,5,5) for example, because my model is too small, but then the lighting isnt sufficient. Is there a way to scale the lighting as well ? Or how can I keep the light constant with scaling the model ?

Re: [osg-users] Problem with lighting when scaled

2009-08-14 Thread Jean-Sébastien Guay
Hi David, I scale the PositionAttitudeTransform by (5,5,5) for example, because my model is too small, but then the lighting isnt sufficient. Is there a way to scale the lighting as well ? Or how can I keep the light constant with scaling the model ? This is an FAQ. Set GL_RESCALE_NORMAL or

Re: [osg-users] Problem with lighting when scaled

2009-08-14 Thread Andrew Burnett-Thompson
Yes here's the code, I had this problem myself recently [code] // The following is taken from the osg::StateSet documentation re: GL_NORMALIZE / * If the transformation matrix scales the subgraph then the normals

Re: [osg-users] Problem with lighting when scaled

2009-08-14 Thread David Goering
Hey, Thanks for the quick answers. Now that I read them I remember that I have read this somewhere else, dont know why I forgot :o But thanks anyhow, helped me alot! David -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=16277#16277 __