Seems to me you are trying to go through a lot of trouble to
get the static geometry drawn.  The goal is to restore the frame
buffer and the depth buffer to the same state every
frame and then draw your dynamic objects.  I would think that the
best performance would come from rendering this state to a texture
and then restoring this state every frame using some camera aligned
geometry.


> ----- Original Message -----
> From: "Robert Osfield" <[EMAIL PROTECTED]>
> To: "osg users" <osg-users@openscenegraph.net>
> Subject: Re: [osg-users] Static scene optimization
> Date: Mon, 26 Feb 2007 21:01:44 +0000
> 
> 
> On 2/26/07, DANIEL BASS <[EMAIL PROTECTED]> wrote:
> > I have a simulation that uses an arbitrarily rich terrain database that is 
> > viewed from a static eyepoint.
> > The user interacts with models that move around wrt the terrain.  Since the 
> > eyepoint is fixed for the
> > duration of a scenario, I would like to optimize the rendering of the 
> > terrain by taking advantage of that
> > fact.
> >
> > In particular:
> > A) Culling the terrain once and retaining the cull results for all 
> > subsequent frames
> > B) After the first render, run all the geometry again with an occlusion 
> > test 
> > and throw away all
> > geometry that is, in fact, occluded.
> >
> > However, I am not at all clear on how I would do either of these things.
> 
> Me too :-)
> 
> > Can someone offer me a clue?
> 
> The core OSG already has extension bindings for all the OpenGL
> extensions required but no high level use of them yet.  Howerver, Paul
> Martz will be working of doing occlusion query based culling soon so
> perhaps he can cut in.
> 
> General principle will be the render the scene once, then turn on the
> occlusion querry extension and through all objects at the graphics
> card again, then wait for all the pixel coverage results to come back.
> Then tag/discard all parts of the scene that have zero pixel
> coverage.
> 
> You next question is what to do about all the bits that aren't visible
> - you could remove them entirely from the scene graph, or just use a
> NodeMask set to 0 to switch them off.
> 
> You could do this all in a pre process frame before you main frame
> loop begin and then just treat your scene as you usually would - just
> update, cull and draw the whole scene.  In theory you could reuse the
> cull results from the pre processing stage but I believe this will be
> more awkward than its worth as there will still be new objects
> entering into the scene that will need to cull and drawn uniquely for
> each frame.
> 
> Robert.
> _______________________________________________
> osg-users mailing list
> osg-users@openscenegraph.net
> http://openscenegraph.net/mailman/listinfo/osg-users
> http://www.openscenegraph.org/

>



===================================
Sean S Cullen
Staff Software Engineer
Lockheed Martin STS
164 Middlesex Tnpk
Burlington, MA  01803
(781)505-9522

_______________________________________________
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to