Why not just turn lighting off in the stateset? If you need the effect, you can adjust the color of your points dynamically based off the dot product of the point vector and the light source vector. This is manual lighting.
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robert Osfield Sent: Thursday, April 26, 2007 3:38 AM To: osg users Subject: Re: [osg-users] backface culling using normals Hi Sandy, Back face culling is done one faces, rather than normals so it won't help you. Using two opposing cameras might work at illuminating the back facing normals, but it'll also over illuminate the scene. To add the lights use two osg::LightSource, see the osglight example. If you want the lights to move with the viewer then set ReferenceFrame on the LightSource nodes to ABSOLTE_RF. Robert. On 4/26/07, Sandy Patterson <[EMAIL PROTECTED]> wrote: > Hi all, > > I'm trying to view point data, and my problem is this: > > Each point in the set has color, normal, and position fields. > However, the normal field is a little wonky (some are backwards) What > I'd like to do is pretend that the normal is facing towards the camera > (flip it if it's facing away from the camera). > I see two possible solutions, and i'm not sure how to do either, any > help would be greatly appreciated. > > sol 1) use backface culling by comparing the normal to the points > location relative to the camera. I'm not sure if this is possible. Can > we only do backface culling using windings? If this works, I can > duplicate every point so i render both the normal and the -normal. > > sol 2) duplicate the light source so it's lit from in front and > behind. Is there a way to add another light source into an > osgProducer::Viewer instance with the opposite direction as > osgProducer::Viewer::HEAD_LIGHT_SOURCE > > sol2 is probably superior in terms of performance because there is no > point dupliaction. > > Thanks a lot for your help, > Sandy Patterson > _______________________________________________ > osg-users mailing list > [email protected] > http://openscenegraph.net/mailman/listinfo/osg-users > http://www.openscenegraph.org/ > _______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/ _______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
