Hi Wang Rui,

This submissions changes the LOD/PagedLOD to work like a switch rather
than an LOD which for me sounds at odds with their role in the scene
graph.  Another issue is that if you wanted to mix a scene graph that
you are rendering with one that you want to take a screen capture for
one frame you would have a collision of state - the rendering one
would want the LOD/PagedLOD in a normal state while the screen capture
would want it in a high res version.

How about using a custom cull NodeCallback to do the choice between
which children to traverse/request?  Such a callback could potentially
work out what type of traversal is occurring an make a choice
accordingly.

Thoughts?
Robert.


On Tue, Dec 1, 2009 at 7:29 AM, Wang Rui <[email protected]> wrote:
> Hi Robert,
>
> I've made some modifications on LOD and PagedLOD while working on the
> high-res screen autocapturing functionality (osgautocapture +
> osgposter example, but not finished). I just added a USER_SPECIFIED
> item to the range mode enumeration and a setActiveChild() method, to
> force load specified level of details instead of computing the
> distance from eyepoint, if needed be.
>
> To make it work, developers should change the range mode first, and
> then decide which child of the LOD node will become active:
>
> lod->setRangeMode( osg::LOD::USER_SPECIFIED );
> lod->setActiveChild( 1 );
>
> Child node at index 1 will be accepted (or automatically) in update
> and cull traversals, regardless of min/max range settings.
>
> And it's easy to reset:
>
> lod->setRangeMode( osg::LOD::DISTANCE_FROM_EYE_POINT );
>
> This mechanism should be useful if we want to load specified level of
> a LOD node at some time. For instance, high-res capturing requires
> multiple projection matrices for sub-rendering cameras, but leaves the
> modelview matrix alone. In that case, we could either set the LOD
> scale to a very low value, or keep the camera close to the ground to
> obtain highest levels of a terrain with quadtree. But both are not
> good enough, I think.
>
> If it's possible to set the active child of a LOD or PagedLOD
> directly, a developer may force loading the highest levels of a
> limited area of terrain tiles and capture a sub-image, and then
> another area, until he collects all the sub-images and constructs the
> entire poster. This would be easier and much more efficient than
> loading the whole detailed terrain. What's your opinion?
>
> Cheers,
>
> Wang Rui
>
> _______________________________________________
> osg-submissions mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
>
>
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to