Re: [osg-users] Ground clamping to paging terrain
brettwiesner wrote: I want to position something (let's say a building) to a terrain. Currently I'm getting the Z value for the building doing this with an osgUtil::IntersectVisitor and that works fine for static terrains. When I run on a paging terrain (like one from osgEarth) and I position the building, I get a Z value of the lowest LOD. Then more data pages in and the building gets buried underground as more accurate data comes available. What's the most effiecient ground clamp things to paging terrain? I think you're on the right track. I ran into this before -- the Intersect visitor only goes to the lowest LOD. but I think you could adapt it to be smarter. Thanks, Brett -- Chris 'Xenon' Hanson, omo sanza lettere Xenon AlphaPixel.com PixelSense Landsat processing now available! http://www.alphapixel.com/demos/ There is no Truth. There is only Perception. To Perceive is to Exist. - Xen ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Ground clamping to paging terrain
There is an osgSim::ElevationSlice that might be useful here, because it is smart about paged databases and will go to the highest LOD to get the elevation values. Paul Martz Skew Matrix Software LLC http://www.skew-matrix.com +1 303 859 9466 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Ground clamping to paging terrain
Brett, Installing a ReadCallback on your IntersectionVisitor will allow it to traverse PagedLODs so you can intersect with the highest LOD. Look at osgSim::HeightAboveTerrain for a demonstration of the technique. If you don't like that approach, you could install an osgDB::Registry::ReadCallback, and re-clamp an object each time a new higher LOD tile pages in under the object's location. Glenn Waldron : Pelican Mapping : http://pelicanmapping.com : +1.703.652.4791 On Thu, May 28, 2009 at 4:03 PM, brettwiesner brettwies...@gmail.comwrote: Hi, I want to position something (let's say a building) to a terrain. Currently I'm getting the Z value for the building doing this with an osgUtil::IntersectVisitor and that works fine for static terrains. When I run on a paging terrain (like one from osgEarth) and I position the building, I get a Z value of the lowest LOD. Then more data pages in and the building gets buried underground as more accurate data comes available. What's the most effiecient ground clamp things to paging terrain? Thanks, Brett ___ 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