Deformable Terrain

Hi, im new to jme3.

i want to do a deformable terrain. For example if a meteor fall on the terrain it will leave a craters.

How can i start?any help please…

thank you in advance…

Well, if you at least had looked at the methods or the javadoc of the terrain api you would have found a “setHeight” method. In the future you can use this to change the height of the terrain in some location but I think its not yet working.

I’m currently working on height deformation and integrating that into jMP. It might be handy to have some set deformation methods that can be applied to the terrain, outside of the editor. So I will see about adding them to the actual terrain package.

that would be so awesome :smiley:

ack, didn’t quite make it in last night :frowning:

The netbeans platform wasn’t playing nice with my inexperience using it :stuck_out_tongue:

I’m booked up the next two days, but this weekend it will definitely be committed.

I am also making a terrain wizard, it will have you specify the terrain size, patch size, and specify a heightmap generation method: flat (default), from an image, procedural hills, procedural fault fractal.

If there are any other procedural heightmap techniques anyone wants included, submit me or this, list a patch (it must extend the AbstractHeightMap class) and I will review it and put it in jme3 and jMP.

wow, awesome new xD

And don’t be that rough on ya, no one is forcing anyone, its open source after all.

Can’t wait seeing it all tho :stuck_out_tongue:


I still got a question about the terrain editor.

Can I use the terrain editor in combination with the Scene Composer ? For example, can I save the terrain to a .j3o file and link this j3o file in the Scene Composer ?

As it is right now, the terrain wizard will attach the terrain to a node you select in your scene. So you can use it with the scene composer too. It’s not a separate j3o file or anything, not sure if it needs to be since it is fully created in the editor and doesn’t need to be imported.

Ok. That sounds good then. I’m really looking forward to it. :slight_smile:

My application architecture is based on the scene composer, so this was a blocking issue for using the terrain engine.

Can I generate the physics for the terrain in the terrain editor ?

You cannot generate physics for terrain in jmp yet (at least not that I know of, I know I haven’t put anything specific in for that). Terrain does support physics in jme3 however, so you can add that in your code. Just look for the node that is the terrain and attach physics to it.

I committed an update to the terrain editor. You can now generate terrain in jmp either using the hill heightmap tool, a flat terrain map, or by importing a heightmap image. The editing tools still aren’t quite ready; too many bugs in them right now to release out into the wild :slight_smile: