Re: [osg-users] Problem with default lighting

2008-11-19 Thread Eduard Trulls
Ach, I've had a couple hectic days and forgot to answer until now. Thank 
you (and Robert both), that was it and I overlooked it. I've managed to 
replicate this behaviour converting from sketchup to osg file formats 
through obj and collada, so I guess the problem might be on either end. 
I'll try to narrow it down when I have the time for it.


Thanks again,
E.

Ulrich Hertlein wrote:

Hi Eduard,

if you look at Geodes Mesh6 Model and Mesh7 Model you'll notice 
that they don't have any normals whatsoever.  I'd suspect they're just 
picking up normals from one of the previous nodes.


/ulrich
___
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


Re: [osg-users] Problem with default lighting

2008-11-17 Thread Robert Osfield
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


Re: [osg-users] Problem with default lighting

2008-11-17 Thread Ulrich Hertlein

Hi Eduard,

if you look at Geodes Mesh6 Model and Mesh7 Model you'll notice that they don't have 
any normals whatsoever.  I'd suspect they're just picking up normals from one of the 
previous nodes.


/ulrich
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org