Hi Thomas,

It's possible to adjust the children selection dynamically by
adjusting the Camera::LODScale via
viewer.getCamera()->setLODScale(myScale);.

However, I think this is probably just a hack around what it
essentially an issue of poor load balancing in the paged database you
have built.  In essence what you are trying to do when using
LOD/PagedLOD's is to keep the load on the whole computer to a level
that the system can handle it comfortably.  Think about trying to aim
for a constant number of nodes in memory and on-screen, and constant
number of polygons and textures on screen, we can never attain this
exactly but this is the goal of load balancing.

Using of PagedLOD over LOD allows you to scale higher as you are
no-longer limited by main memory, however, you can still easily build
databases that are too big even for runtime use - if this is the case
then you either have to simplify the children at each LOD range or
make the LOD's ranges more conservative.

With an Octree the potentially for an explosion of nodes and
complexity of the scene is pretty high unless the Octree is sparse,
this keep balancing the books you will have to be prepared to be quite
conservative with your range settings.

There is of course often other ways to solve problems.  Perhaps some
other type of rendering/scene graph approach can held lower the load,
this needn't be in place of paging.  What other techniques might
appropriate I can't say as I know close to nothing about your
application and the type of data you are trying to handle.

Robert.

Robert.

On Fri, Oct 22, 2010 at 5:41 PM, Tomas Hnilica
<tomas.hnil...@webstep.net> wrote:
> Hi,
>
> I am using osg::PagedLOD nodes in my project for large models visualization.
> The model is splitted into several parts (like octree) and multiresolution 
> tree is made - same as VPB uses:
>
>
> Code:
>
> Group
>   PagedLOD
>      child 0 -> local tile geometry at low resolution
>      child 1 -> external file reference
>
>   PagedLOD
>      child 0 -> local tile geometry at low resolution
>      child 1 -> external file reference
>
>
>
>
>
> I understand the system of unloading nodes by DatabasePager, when PagedLOD 
> nodes count is bigger than OSG_MAX_PAGEDLOD (I hope that unloaded pagedlod 
> nodes unload also corresponding data on GPU - when using VBO)
>
> The system works fine, but the problem is in good PagedLOD::setRangeMode and 
> PagedLOD::setRange (between lower res. geode and external reference) data 
> setting.  Since my model is not terrain, definition of setRange value is 
> crucial. I use PIXEL_SIZE_ON_SCREEN metrics and by low setRange number the 
> high resolution files are requested, high number of Geometries is loaded and 
> openGL out-of-memory occurs and no new nodes are loaded. The setRange number 
> depends on graphical window size, GPU memory, so it should be calculated 
> somehow - to get the best performance from hardware.
>
> Does anyone have tip how to dynamically adjust setRange values? Or is any 
> better technique with different metrics?
>
> I have an idea to adjust setRange (or change LODScale) when an out-of-memory 
> openGL error occurs. Then I would change the setRange value (it is same for 
> all pagedLOD nodes), free the GPU memory and load again.
>
> What do you think about this idea?
> How do I free occupied GPU memory? Is is enough to reconnect the subtree from 
> scene?
> How do I catch openGL error?
>
> Could culling settings help here to have smaller scene? Culling in my app is 
> set to OSG default.
>
> Many thanks in advance,
> Tomas
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=33000#33000
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to