Hi Manu, On Wed, Jun 15, 2011 at 9:49 AM, Emmanuel Roche <[email protected]> wrote: > I understand this as nothing to do with rendering, but it has to do with > loading all tiles in a row instead of loading them only when there is some > time available between two frames as the databasepager does. Since the > intersection is done for me in the rendering loop this is blocking > everything for too long.
Doing intersections in the rendering loop should only be done with no external file excees - the DatabasePager loads in a background thread to prevent any stalls. For you case you either need to stop using LineOfSight with the it's file cache callback installed, or move the intersections tests entirely out of the rendering loop and do it a background thread. > In fact, I need the highest possible resolution. But I would not mind > getting this final accurate result after multiple cycles (as would be the > case if I let the database pager load the tiles progressively. So I guess, > just putting a camera very close to the ground on the intersection ray would > be a good option. Hacking around with the camera won't address the basic problem - if you want the highest level of detail for interesection you have to load them, and loading them takes time - this simply doesn't mix with a real-time rendering loop. You can't be "clever" and avoid this, it's an intractable problem that can only be resolved by moving the intersections out of the rendering loop into it's own dedicated intersection thread. > => Now, could I really just setup a Cullvisitor manually, traverse the scene > with this visitor, and then perform a updateSceneGraph() call on a regular > basis with the databasepager, and except the tiles to be progressively > loaded this way ? You can't solve the problem this way. You *have* to move the interesection testing outside of the main rendering thread. Consdier using an enterily dedicated scene graph for just this purpose, running it's own threads. Robert. _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

