This technique works fine; I've used it before. Don't forget about adding CameraNode::DO_NOT_COMPUTE_NEAR_FAR and turning on CullSettings::NEAR_PLANE_CULLING and CullSettings::FAR_PLANE_CULLING. I believe all 3 of these settings are unused by default.
If your scene is divided up with a good spatial hierarchy, then you shouldn't have to worry about adding different objects as children of the near or far camera. Just add the entire scene to each camera and let OSG's culling take care of everything. -- Terry Welsh mogumbo 'at' gmail.com www.reallyslick.com > > Message: 1 > Date: Fri, 29 Jul 2011 21:52:46 +0200 > From: "Oren Fromberg" <[email protected]> > To: [email protected] > Subject: [osg-users] Fixing Z-Fighting in Far Field... > Message-ID: <[email protected]> > Content-Type: text/plain; charset=UTF-8 > > Howdy everyone, > > I have objects under a group node called "Objects" that are rendered. When > the objects get too far away, Z-fighting occurs. Would it be possible to fix > the Z-fighting by instead of adding the objects as a child of "Objects", > create two camera nodes as children to "Objects" (farCam and NearCam) and > adding the objects to either camera based on its range to the eyepoint? the > farCam and nearCam would be identical except zNear and zFar for the > projection. Would I need to make any additional settings in the cameras for > this to work? > > Thanks! > _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

