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/

Reply via email to