Hi Brad, I would recommend you read through the PagedLOD.cpp file especially the "traverse()" function. There isn't a callback for when the LOD changes happen. You could create an UpdateCallback() that would calculate the current LOD, but it sounds awful complex and error prone. osgdem generatates a series of nested LODs so you would have to figure out which LODs are relevent, plus deal with the loading of PagedLODs.
Could you instead create LODs for your buildings with a matrix transform and adjust the position of the building slightly for different distances from the camera that match when the terrain LOD changes? You could load your terrain in osgSceneMaker and create LODs for your building adjusting them up and down for difference distances away from the camera that match with when the terrain LOD changes then save the LODs to an .ive file. Another thing you could try is to use the --no-terrain-simplification setting in osgdem or look in the source code for osgdem and increase the desired triangles during simplification (Can't rememember the exact line but search for 512 in the code.) This will lower your FPS and increase your file size, but it would reduce the terrain shifting. Brian http://osgscenemaker.googlepages.com
_______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org