Hi Eduard,
The description of the problem sounds to me like the normals of the
geometries aren't of unit length so messing up the lighting model,
this can happen if there are transforms that scale the scene. You
can enable GL_NORMALIZE or GL_RESCALE_NORMAL modes on the scene to fix
the lengths of the normals. See the include/osg/Transform header for
docs on this issue.
Robert.
On Mon, Nov 17, 2008 at 9:58 AM, Eduard Trulls [EMAIL PROTECTED] wrote:
Hi,
I'm running into a little issue using osgviewer's default lighting scheme
(headlight) in my application, in that some surfaces go from a rather
bright white/gray to pitch black *very* suddenly when viewed at a
relatively sharp angle. Other surfaces viewed at a similar angle may
remain lightened, and the drop-off happens for all parallel surfaces at
the same time, regardless of view position. It all sounds rather
convoluted but it's quite simple; I attach a simple test model you may
open with osgviewer and a screenshot.
The surface normals seem correctly defined (I use sketchup for design,
export as .obj and convert to .osg, then tinker a little bit with the
output). Maybe my understanding of the lighting scheme isn't up to par. Is
this the expected behaviour?
Thanks in advance for any help!
E.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org