Here is another issue we are running into with our application.
There is one part of the application that needs to dynamically load
and display a subset of models from a much larger pool and load/unload
the models based upon the current view. In our current scenario,
these models are buildings within a city or more generally on the
planet, but the same issue comes up with other dynamically loaded
datasets where the full data set is much too large to load into the
system at once.
What would like to do is load as many models into memory as possible
but only take up the minimal amount of resources to render them. This
seems like a perfect place to use LOD nodes, but we have run into a
couple of issues.
1) There is no generic routine in OpenSG (or really in general) to
automatically create LOD models. This would need to take into account
not only geometry, but also materials (textures, shaders, etc).
2) In our case, the textures are the largest part of the data and we
do not have a good way to automatically generate a copy of a model
with lower resolution textures. (we have done something like this
with MateralGroupNodes, but it fails because of #3 below)
3) In OpenSG, if you use LOD nodes (such as ScreenLOD), the resources
for all nodes under the LOD are never released when the LOD is flipped
off. See below..
/-- high_model
LodNode -- med_model
\- low_model
When this node is rendered, OpenSG determines which branch to take.
If this is the first time the branch has been taken, it activates the
model by binding all used textures, uploading all vertex data,
creating display lists, etc. But if it later takes a different
branch, the resources from the previous branch are still consumed.
What this means in our case is that as we pan over more and more
models, we keep consuming more and more resources. By the time the
user moves around the scene a while, OpenSG has loaded the high_model,
med_model, and low_model into memory and onto the graphics board.
This is true even though the LOD nodes may have only 10 of 1000 nodes
in the scene actually viewing the high_model.
I am open to suggestions here, but what I think we need is a way to
tell LOD nodes to free a child branch's resources when it is flipped
away from. This would then tell OpenSG to tell OpenGL to free the
textures, display lists, etc until the next time the LOD is used. It
is likely that people wouldn't want this to be the default setting,
but it would still be very useful.
Any other ideas? Any ideas how to implement this idea?
-Allen
------------------------------------------------------------------------------
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users