Hi Murry,

On Mon, Jan 3, 2011 at 4:50 PM, Murray G. Gamble
<[email protected]> wrote:
> Is it possible to specify that only the highest LOD be paged in (ignoring
> all other LODs), or alternatively is it possible to generate a paged terrain
> database that contains only one (i.e. the highest) LOD (and in so doing
> specify the desired tile size for this highest LOD)?

The osgDB::DatabasePager uses the eye point, center of the LOD's to
compute distances and the LOD ranges decide which PagedLOD to load.
It's designed for rendering a view frustum so this set ideal.  It
isn't possible to force the DatabasePager to keep loading tiles to a
maximum depth, and for it's design purpose it would be inappropriate
from a memory and performance perspective.

> and
> Is it possible to control the maximum range from the observer at which tiles
> will be paged in/out?

This is controlled by the LOD ranges of the PagedLOD that the database
is built with.  You can adjust how aggressive/conservative the LOD's
are selected using the osg::Camera::setLODScale() but it isn't an
absolute measure.

For your purposes trying to re-use a system optimized for rendering to
do intersections is inappropriate.  If you must use the highest res
tile in the database then you'll need to use a scheme such as
implemented in th osgSim::HeightAboveTerrain where it provides a
custom file load callback which keeps loading PagedLOD children until
the highest res ones is found.  This callback does cache tiles, but it
when it has to load in external tiles the intersection cost is very
high as the disk operations are relatively very expensive.  You can't
get around this with a paged database.

Another approach entirely is to store in memory a height field and
then use this just for intersection purposes.

Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to