PDA

View Full Version : dynamic/deformable terrain algorithms


Macerlask
04-28-2006, 05:57 PM
Do you know any algorithm, article, papers, publication, tutorial or other source for deformable terrain? :huh:

Mjolnir
04-29-2006, 12:57 AM
You could do a bit of reading here (http://ddg.sourceforge.net/telist.html), then maybe check out this (http://www.melax.com/csg/index.html) for an idea.
Eventually, you might come up with a method that suits you best.

(BTW, have you fixed those water jaggies?)

Macerlask
04-29-2006, 03:51 PM
Thanks for the information I've found it very helpful. :yes:

About the water, yes I have solved the problem, I will post more details about it in the original Thread...

Macerlask
04-29-2006, 04:43 PM
Any one have something about deformable terrains? :huh:

Mjolnir
04-30-2006, 04:29 AM
If you simply want crater-like deformations, try impressing a sphere into the heightmap, for starters. Is that your idea?

http://i17.photobucket.com/albums/b52/bloodhammer/geomorph2c.jpg

NeZbiE
05-01-2006, 08:36 AM
Hi Macerlask, mind being a bit more specific? What exactly do you wish to do? Maybe I can help, I've worked on something similar in the past where the terrain would be deformed based on the collision of oncoming objects. However, my algorithm isn't very efficient, and tries to simulate a slightly more realistic approach. Just ask me if you want to know more.

The model I used involved the object velocity, mass, orientation (what direction it is facing), shape, and size (all at the time of collision). It's a bit tricky and there's a good bit of math involved, but the model can really be simplified if you're dealing with pseudo-spherical objects, or spherical "impacts" (A velocity/mass/radius model, or simplified even further to a velocity/radius model). I didn't find much information about the topic when I was working on this, so most is original work (and probably not terribly efficient). The computation time required increases dramatically based off the terrain level of detail, and the complexity of the bounding volume (If you're working with spherical impacts it greatly simplifies collision detection).

I tried to add some realism by creating "chunks" of terrain that would be expulsed, somewhat proportional to the volume of terrain chipped off. This debris would in turn deform to a lesser extent the terrain surrounding the original impact zone. I've seen this done several times, and it actually looks pretty neat. Unfortunately, I never could get this exploding "chunk" effect to work properly, so instead, I decided to cover up the actual collision moment with some flashes, and huge billboarded particles ;-) . Maybe I'll get back to it later on.

All of this is part of a work in progress for an event coming late September, so no demos until then, sorry :-)