Hi everyone!

This is a tough one. I'm now certain that there is more than one bug at large 
here! At least one in the pager (the one mentioned in the PagedLOD experts 
thread) and at least one in the txp plugin.

The one I have been chasing for the past 2 days is within the txp plugin and  
looks more like a design issue than a bug. I don't think the txp plugin was 
designed with multiple cameras in mind!

The TXPNode (the top level node when loading a .txp archive) updates the camera 
position in _pageManager on every cull visit (through updateEye). Since there 
is one cull visit per camera per frame, the page manager position jumps between 
multiple positions every frame. Every time the position changes, the set of 
LOD0 nodes is reconsidered. This results in multiple cameras fighting over 
which set of LOD0 nodes should be present. Note that LOD0 nodes, or blocks, 
become children of the TXPNode in the update stage.

At some point, a state is achieved in which a certain number of nodes end up on 
the _nodesToAdd list and the same amount of nodes end up on the _nodesToRemove 
list. Unfortunately, some of the nodes on the remove list are not actually in 
the _children list, so the net result is that more nodes are added than 
removed. This happens every frame, so the number of children of the TXPNode 
increases indefinitely. Since these children are PagedLOD nodes, they, in turn, 
also start loading in children until all memory is exhausted.

It seems to me as though a major overhaul is needed for the txp plugin to be 
able to handle multiple cameras. As I mentioned earlier, one workaround is to 
make sure that each TXPNode is only visited by one camera - for instance by 
loading the terrain anew for each camera.

Cheers,
Michael
[/list]

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=19476#19476





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

Reply via email to