Re: [osg-users] Fixing Z-Fighting in Far Field...
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 orenfromb...@gmail.com To: osg-users@lists.openscenegraph.org Subject: [osg-users] Fixing Z-Fighting in Far Field... Message-ID: 1311969165.m2f.41...@forum.openscenegraph.org 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 osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Fixing Z-Fighting in Far Field...
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! -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=41741#41741 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Fixing Z-Fighting in Far Field...
On 07/29/2011 03:52 PM, Oren Fromberg wrote: 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? Hi, Oren, Sounds like you want to look at the osgdepthpartition example. What you're talking about is possible, but it may be a bit more complex than you're thinking. --J ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org