[osg-users] Runtime Crater

Robert Osfield robert.osfield at gmail.com
Fri Jul 11 11:46:48 PDT 2008

On Fri, Jul 11, 2008 at 5:37 PM, CG <timpcg at msn.com> wrote:
> Hi all,
> I need help in creating runtime craters (cause by explosion event), are
> there any examples?

The way I'd tackle this would be either:

1)  Just modify some static geometry directly, then dirtyBound(),
dirtyDisplayList() on the associated drawables.

2) Create a osgTerrain::TerrainTile based terrain which will provide
you with a HeightField representation of your terrain, and use a
custom osgTerrain::TerrainTechnique that implements shader based
displacement map, to dynamically update the heights of tile to match
the HeightField.  Passing in a HeightField as a vertex array, or a
vertex texture would allow you to stream the height field efficiently
enough that you could update it dynamically on each new frame.


More information about the osg-users mailing list