Hi JS, Hows about using a cull callback that caches the compute near/far values before traversing the subgaph then restores the value afterwards, it'd only take a couple of lines of code.
Robert. On Tue, Apr 21, 2009 at 6:55 PM, Jean-Sébastien Guay <jean-sebastien.g...@cm-labs.com> wrote: > Hi Chuck, > >> Although not an optimal solution, and probably more of a work-around to >> your question ... I use a skydome as well. In my case, I just create a >> sphere whose radius is that (or a little less than that) of the camera's >> far-field value, which I've set to be quite large (60,000-meters). This >> works for my use case. But again, it's not an optimal solution. I'd also >> be interested in a more optimal and scalable solution. > > I prefer letting OSG manage my near+far planes according to the geometry in > my scene, that way I can have optimal depth precision in pretty much all > situations. The problem here is that this particular node should not be part > of those calculations (I've set it to always win the depth test and render > first, so that transparency with it works and it will be drawn even if the > far plane is closer than its surface). > > Thanks for your suggestion though. Anybody else have an idea? > > I just had a thought, perhaps I could make a ComputeBoundCallback that would > return a very small bounding sphere, and disable culling on the skydome... > I'll try that and report how it goes. > > J-S > >> >> chuck >> >>> -----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 12:13 PM >>> To: OpenSceneGraph Users >>> Subject: [osg-users] Geometry considered in near+far plane auto >>> computation >>> >>> Hi all, >>> >>> I need some nodes to be ignored by the near+far plane auto computation. >>> I was wondering, is there some other way than >>> setReferenceFrame(ABSOLUTE_RF) to do this? >>> >>> My specific use case is a skydome. It needs to be very large, but still >>> be "in the world" - if I use the same trick as for a skybox (moving the >>> cube with the camera) it will look like the horizon moves up relative >>> to >>> the terrain if I move the camera higher in altitude... Not a desirable >>> effect. >>> >>> 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 >> > > > -- > ______________________________________________________ > 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