POV-Ray : Newsgroups : povray.binaries.images : Calculating water flow : Re: Calculating water flow Server Time
1 Aug 2024 04:12:01 EDT (-0400)
  Re: Calculating water flow  
From: clipka
Date: 11 Dec 2008 13:50:01
Message: <web.49416025b440b799f708085d0@news.povray.org>
"Kirk Andrews" <kir### [at] tektonartcom> wrote:
> So far, my code simply picks a random starting point, checks the altitude of
> points around it, and chooses the lowest point. Then it repeats, creating cones
> to indicate its path.

So you're actually simulating the path of "droplets" down the terrain, right?

Hm... I'm not too familiar with this, but it's an interesting subject. And what
you achieved so far looks quite good already.


> When the lowest new point is higher than the current point, water ought to
> collect.  I've tried adding code to create ponds where the water ought to
> collect, but I'm running into weird problems.

Hum... what kind of problems do you get?


I'm thinking about what could possibly go wrong, and I'm coming up with these
issues:

- You have multiple options where to place cones while tracing the droplet's
path. If you place it at the point where the droplet moves to, you may be
ending up with pools being eroded further as water accumulates in them, which
is not realistic. So I guess the right thing is to place the cone where the
water comes *from* for every move.

- You need to take into account the slope of the terrain. Shallow areas lead to
a slow movement, which has less of an eroding effect.

- Actually, you may want to simulate that the droplets carry the eroded material
with them, depositing them where the water runs quite slowly.

- You may also want to take into account the speed of a droplet; moving along a
downward slope will accelerate it accordingly, and the current speed &
direction give it a bias for the direction of the next movement step, allowing
it to even travel slightly uphill. Furthermore, if a droplet's direction of
movement changes, erode the terrain in the original movement direction a bit.
This should allow you to get maeanders and such.

- You may also want to do some erosion of extreme terrain slopes even without
water being involved. Think of crumbling cliffs and such. (Note that material
deposited this way will in reality be more susceptible to further erosion
effects. Once it's crumbled, it's crumbled.)

- To simulate pools, one possible solution would be to add another layer above
the terrain that indicates how much water is currently "standing" there. A
droplet currently under simulation would continue "flowing" across this "lake
surface" (without eroding it of course, but maybe depositing eroded material on
the "lake bed" below), again until it cannot move further. At the place where it
comes to rest, raise the "lake surface" a little bit.

- If water flows across a "lake surface", then hits dry land again *and* can
continue to flow, remember that spot because your new droplet has just eroded
the shore a bit; as soon as you're finished with the current droplet,
pick a random droplet from the lake adjacent to the eroded place, and have it
flow out.

- Simulating layers of material which exhibit different resistance to erosion
will make for good effects I guess.


Just a bunch of thoughts that crossed my mind about this. They may be unrelated
to your actual problem though, so for further hints we'd probably need a
description of the issues you have with the pools.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.