HI Janna, On Mon, Nov 23, 2009 at 3:05 PM, Janna Terde <[email protected]> wrote: > 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.
For interactively modifying heights you'll need to think about how often you are modifying the heights. Even osgTerrain::GeometryTechnique would need to re-initialize it's internal geometry when you modify the terrain, so you'd see a performance hit just as you would for using ShapeDrawable. What osgTerrain does give you is the ability to abstract away the implementation of how you do the rendering, the GeometryTechnique is just the first of the TerrainTechniques that I have envisaged for osgTerrain. It's possible to implement your own TerrainTechnique that works efficiently for you own needs - and if this is dynamic update then the using a vertex shader and a vertex texture (made up of the HieghtField) would be the most efficient way to tackle the task. You could also just write your own shaders and use a straight osg::Geometry as well. The osgshaderterrain shows a height field being used as a texture in this way. Robert. _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

