Terrain deformation or general trimesh to trimesh deformation

My goal is to be able to have a Terrain be deformed by missle explosions, where the terrain will be deformed by a given Sphere's geometry, or some other explosion geometry.



I was wondering if anyone had any details on how to do terrain heightmap deformation in Java Monkey Engine. I noticed someone posted on the JME forums:

(http://www.jmonkeyengine.com/jmeforum/index.php?topic=3239.0)


you can deform hieght maps i had a demo where this animation ran cirlces in what was "snow" and every frame i would grab the characters position and take that point on the height map and put it down to zero.  Only problem was i never found a good way to reset the point so it looked like snow accumulation, also keeping track of where the model had been was also a problem.


Does anyone have any source code that performs this stuff, or point me to what to look at in the API? Thanks!!

I'm thinking that if I take a look at the ClothPatch implementation I could get some ideas on how to deform a given TriMesh when it collides with another TriMesh.




I found this article regarding morphing of a 3D object in OpenGL on NeHE:

http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=25



This seems like a step towards the terrain deformation, but with the terrain you want to only morph the collided pieces of the mesh with the colliding mesh. I think you can capture most of that specific information using the triangle collision in jME. Also in jME there is a tutorial on animation and morphing I’m going to look into that a little more see if that gives me any ideas (the HelloKeyFrames.java) .


For terrain you could do heightmap based deformation, instead of looking at the mesh.