Hi Markus, Assuming you're using a simple grayscale image as your heightmap. A very quick way would be to use the osg::HeightField shape in conjunction with the osg::ShapeDrawable class. You would load the image into an osg::Image class and then extract the height information, in this case the pixel value into the osg::HeightField array. If that's then added to a ShapeDrawable and in turn to a geode you'll get it up on screen in no time.
Be aware that osg::HeightField doesn't compute very accurate normals (i think it uses 4 point normals) and should only really be used as a data structure or for prototyping. Hope that helps. K. 2009/7/22 Markus Husseini <[email protected]> > Thanks for the answers. > > @declic creation: I think this is a little bit to much for my project. > > @Kim Bale: This looks nice, but my problem is that i have to use the osg > API only and there I need the opengl libs ;(. Or i must write my own Code to > load an image and get there data. > > I read something about the Terrainclass but i did not find something for > use and the Reference is not realy helpfull. > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=15264#15264 > > > > > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

