Thank you for the code David. Unfortunately,
I was not able to get it working. It just turned my whole screen black. All
the models were there, I just couldn’t see them.
What I ended up doing was setting my far
clipping plane past the extents of the EphemerisModel. I am not very happy
with the solution, but it seems to work because 99% of the objects in my scene
are PagedLODs. Since I can control the loading/unloading of the PagedLODs via
the setRange() function, my scene does not get cluttered even with a very far
clipping plane.
Andrew
From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On
Behalf Of David Spilling
Sent: Thursday, June 08, 2006 6:08
AM
To: osg
users
Subject: Re: [osg-users]
osgEphemeris Culling
Andrew,
Class attached. I don't use osgEphemeris (yet) so don't know exactly how this
might interact with it. My graph from bottom to top looks like :
Sphere - DepthFunction(always), depthRange(1.0,1.0), Sky texture map, fog and
lighting off
|
MoveEarthySkyTransform (or similar type thing which is probably already in osgEphemeris)
|
ExtentsCamera
|
Rest of scene
I also do
extentsCamera->setRenderOrder(osg::CameraNode::PRE_RENDER);
extentsCamera->setRenderTargetImplementation(osg::CameraNode::FRAME_BUFFER);
extentsCamera->setClearMask(GL_DEPTH_BUFFER_BIT|GL_COLOR_BUFFER_BIT);
and put a ClearNode with RequiresClear(false) off the root node to prevent the
"main renderbin" from clearing the screen again.
to place the sky first. Unfortunately I think this means pixel overdraw (you're
drawing the sky behind objects) which is bad if you have expensive atmosphere
shaders, but I didn't find anyway around this.
Hope that's useful.
David
|
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/