[osg-users] Height fields implementation
Chris 'Xenon' Hanson
xenon at alphapixel.com
Mon Nov 23 08:55:57 PST 2009
Janna Terde wrote:
> Hi Robert,
> Thank you very much for your reply!
> I am going to look into the osg::Terrain.
> The other goal is to make an interactive editing of the height field so we can change the layout of the terrain on fly. However when I used Height Field class and alternated the values of the height with setHeight() functionality, the performance was very slow.
> Would the usage of the osg::Terrain::TerrainTile with HeightFieldLayer improve this aspect?
It is generally understood that aspects of the design of Heightfield make its
performance poor compared to osg::Terrain::TerrainTile/HeightFieldLayer.
> I found out that currently (using plain HeightField ) the slowdown happens when I search for the intersection using LineSegmentIntersector and
> when I reset a height of the grid cell using osg::HeightField::setHeight().
Yes. My understanding is that the data storage of HeightField is sub-optimal for
transfer-speed to OpenGL, and it may not be especially fast for intersection either. Try
the osg::Terrain::TerrainTile/HeightFieldLayer combination as we've suggested several
times. It's not a good use of anyone's time to keep speculating on why HeightField isn't a
good choice. It just isn't.
> Cheers,
> Janna
--
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
More information about the osg-users
mailing list