> I'm familiar with the projection matrix and the auto compute modes... I don't > want to set the actual near and far plane values, I want to set the values that > the CullVisitor computes... It seems to me that the computed values will be > computed completely before
Ah! Je comprend! Seems like it'd be nice to have a callback to compute the far and near planes. Would you like to code that up? OSG does allow you to set the ratio of near and far. OSG computes the smallest far plane value, then uses this specified ratio to compute the furthest near plane value such that the equation (far/near <= ratio) evaluates to true.. But this is the only option I know of without changing the code. Paul Martz Skew Matrix Software LLC http://www.skew-matrix.com +1 303 859 9466 -----Original Message----- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Jean-Sébastien Guay Sent: Tuesday, April 21, 2009 1:46 PM To: OpenSceneGraph Users Subject: Re: [osg-users] Geometry considered in near+far planeauto computation Hi Paul, > I currently disable autocompute and set a large far plane value and a > small near plane value, but this results in z fighting. That's exactly what I'm hoping to avoid. > The equivalent to this in > OpenGL would be to use two Camera nodes. > [...] > Seems like you could do something similar with your skydome. Use a > camera to render the skydome, then a second camera to render > everything else in your scene. Yes, that seems like it could work. I'll look into it. > (By the way, to "set" the near and far plane values, you set the > projection matrix. OSG abstracts this away to make them look like two > separate concepts, which is why we have a FAQ on "why does OSG seem to > ignore my near and far values?" The answer is that OSG, by default, > autocomputes the near and far planes and overrides those values as set > by an application that explicitly sets the projection matrix.) I'm familiar with the projection matrix and the auto compute modes... I don't want to set the actual near and far plane values, I want to set the values that the CullVisitor computes... It seems to me that the computed values will be computed completely before any actual drawing occurs, so setting the near/far myself won't change anything since the auto compute will then overwrite my values. I'm basically looking for a way for my skydome not to affect the calculated near/far values. Thanks, J-S -- ______________________________________________________ Jean-Sebastien Guay jean-sebastien.g...@cm-labs.com http://www.cm-labs.com/ http://whitestar02.webhop.org/ _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org