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/
