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
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to