• Advertisement
Sign in to follow this  

D* to model lava/river flow

This topic is 3625 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, For a dissertation project i'm creating procedural terrain, which I want to then create a volcano which erupts and erodes the terrain. So far i've got the procedural terrain working adequately enough (varying heights and mountainous regions), and i'm thinking about the Lava. My initial plan was to use D* pathfinding, since the level would be changing during runtime. An extension of the terrain was then going to be to have different compositions of mud, rocks, stone, grass etc, and then have this depict a more realistic path for the lava (going around rock, but taking away mud and loose gravel etc). Deposition is also planned for the project. However, at the minute I don't have different terrain compositions of different types of mass etc. I was thinking that maybe D* would be a bit extravagant for a simple terrain generated, when really the same effect could be achieved to just spawn lava particles, and let them move with gravity down the hill? Thus the lava will always move downwards when possible, as well as eroding the parts it is currently on. This won't look as impressive as if there was rock, mud, sand etc, all being eroded differently, but for an initial version, would it just be best to have the lava moving to gravity downwards over the terrain? Any thoughts welcome :)

Share this post


Link to post
Share on other sites
Advertisement
An object could travel downhill by moving towards the lowest Z vertex of the terrain triangle that is currently above, breaking ties by choosing nearest, breaking any remaining ties by choosing first in list.

And when it arrives at a vertex, then it would choose from the verticies of the triangle fan surrounding that vertex.

Share this post


Link to post
Share on other sites
I was not aware that molten rock was capable of planning.

Share this post


Link to post
Share on other sites
To my knowledge, I don't think that D* would be appropriate for simulating lava; it does not, as Vorpy said, plan. I'm not an expert on molten rock, but I'd suggest a gradient descent algorithm instead. This way, you could still avoid rocks, but the lava would follow a more natural path. Also, it should be much faster than D*.

http://en.wikipedia.org/wiki/Hill_climbing

Share this post


Link to post
Share on other sites
In other words, heavy fluids tend to flow downwards. Simulations of the effect of water on landscapes just need to track the height of the water at any location (and the amount of soil dissolved in the water, etc). Each simulation step, water flows at a rate proportional to the height difference, in a way that levels out the height of the water. I imagine a magma flow would behave similiarly. Track things like the height and temperature of the magma, perhaps.

Share this post


Link to post
Share on other sites
Very good points! Heh, yeah I just considered D* as it sounded at the start of the project like that would be good for dynamic terrain, but then realised there really was no point. Thanks for the tips and info! Probably saved me a lot of time here too :)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement