Spellcaster Studios

Make it happen…

Water courses tests

I’m trying out using a cellular automata in creating the river courses…

The results work great to make lakes, but not rivers:

screen454

Here you can see the iterations of the automata:

river01

The problem it seems to be that the current algorithm checks for each grid element if a neighbor has water in it, and if it is higher, and it fills the current one with water if that’s the case, but in most cases, that creates the effect you’re seeing, instead of a river, since it’s likely that a lot of grid blocks have the same height around a water element, instead of creating a sort of “river bed”.

I can see two ways to fix this: one is not to use the cellular automata, and use a more direct approach: for each water block, check the lowest neighbor and walk that way, and repeat the process.

Another way is to actually dig a trench. So when I place a water element, I dig it down a bit so that it’s the lowest element in the direct vicinity, and move forward with that…

Going to try these tomorrow!

Now listening to “Pristine in Bondage” by “Amaran”

Comment