POV-Ray : Newsgroups : povray.binaries.images : Tracing the path of streams Server Time
1 Dec 2026 16:05:32 EST (-0500)
  Tracing the path of streams (Message 1 to 50 of 77)  
Goto Latest 50 Messages Next 27 Messages >>>
From: Kirk Andrews
Subject: Tracing the path of streams
Date: 14 Feb 2017 14:05:01
Message: <web.58a353e0c23a6d9d61e8dc40@news.povray.org>
Hey everyone! Been a long time!

I found myself in need of a creative outlet, and so I dug up my old POV files.
When last I left off years ago, I had been working on trying to get more
interesting water formations in my landscapes. I had apparently stopped mid-way
through a little algorithm for tracing the flow of streams through the
landscape, forming lakes in the valleys. I decided to try and finish it out a
little more.


Post a reply to this message


Attachments:
Download 'water3.jpg' (378 KB)

Preview of image 'water3.jpg'
water3.jpg


 

From: William F Pokorny
Subject: Re: Tracing the path of streams
Date: 14 Feb 2017 14:52:24
Message: <58a35ff8$1@news.povray.org>
On 02/14/2017 02:01 PM, Kirk Andrews wrote:
> Hey everyone! Been a long time!
>
> I found myself in need of a creative outlet, and so I dug up my old POV files.
> When last I left off years ago, I had been working on trying to get more
> interesting water formations in my landscapes. I had apparently stopped mid-way
> through a little algorithm for tracing the flow of streams through the
> landscape, forming lakes in the valleys. I decided to try and finish it out a
> little more.
>
Cool - and welcome back!

What general approach are you using?

Bill P.


Post a reply to this message

From: Kirk Andrews
Subject: Re: Tracing the path of streams
Date: 14 Feb 2017 15:30:01
Message: <web.58a367fcbd8ebaffd61e8dc40@news.povray.org>
> Cool - and welcome back!
>
> What general approach are you using?
>
> Bill P.

Thanks!

It's pretty simplistic – we start a stream in at a random location, use trace to
test points in a circle to find the lowest point nearby, build a cone from here
to there, and repeat. If we find ourselves in a valley, we'll keep expanding our
test radius until we find a way out, and fill it up with a cylinder as we go.


Post a reply to this message

From: Stephen
Subject: Re: Tracing the path of streams
Date: 14 Feb 2017 15:41:45
Message: <58a36b89$1@news.povray.org>
On 2/14/2017 8:26 PM, Kirk Andrews wrote:
>> Cool - and welcome back!
>>
>> What general approach are you using?
>>
>> Bill P.
>
> Thanks!
>
> It's pretty simplistic – we start a stream in at a random location, use trace to
> test points in a circle to find the lowest point nearby, build a cone from here
> to there, and repeat. If we find ourselves in a valley, we'll keep expanding our
> test radius until we find a way out, and fill it up with a cylinder as we go.
>

Isn't that what water does in RL?
It looks good.

-- 

Regards
     Stephen


Post a reply to this message

From: Kirk Andrews
Subject: Re: Tracing the path of streams
Date: 14 Feb 2017 16:50:00
Message: <web.58a37b11bd8ebaffd61e8dc40@news.povray.org>
> Isn't that what water does in RL?
> It looks good.
>
> --
>
> Regards
>      Stephen

Well, I suppose to really get it down we'd probably want to factor in some
inertia.


Post a reply to this message

From: Stephen
Subject: Re: Tracing the path of streams
Date: 14 Feb 2017 17:17:04
Message: <58a381e0$1@news.povray.org>
On 2/14/2017 9:48 PM, Kirk Andrews wrote:
>> Isn't that what water does in RL?
>> It looks good.
>>
>> --
>>
>> Regards
>>       Stephen
>
> Well, I suppose to really get it down we'd probably want to factor in some
> inertia.
>

No, to get the water down you just need gravity. :-)
Seriously, Would you intend to make close ups or an animation? These 
landscapes are generally quite static over short time spans. (I am sure 
Thomas might have an opinion.)

It actually gives me an impression of the Scottish Highlands with 
interconnected lochs. It can't be because the sun is shining and it 
doesn't look cold. ;-)
I like the pattern of vegetation as well.
How long did it take to parse and render?


-- 

Regards
     Stephen


Post a reply to this message

From: Thomas de Groot
Subject: Re: Tracing the path of streams
Date: 15 Feb 2017 02:51:33
Message: <58a40885$1@news.povray.org>
On 14-2-2017 23:17, Stephen wrote:
> On 2/14/2017 9:48 PM, Kirk Andrews wrote:
>>> Isn't that what water does in RL?
>>> It looks good.
>>>
>>> --
>>>
>>> Regards
>>>       Stephen
>>
>> Well, I suppose to really get it down we'd probably want to factor in
>> some
>> inertia.
>>
>
> No, to get the water down you just need gravity. :-)
> Seriously, Would you intend to make close ups or an animation? These
> landscapes are generally quite static over short time spans. (I am sure
> Thomas might have an opinion.)
>

Oh, I do! I do! This is coming at a time when I have been wondering how 
to fill those valleys with streams. Lately, I have been working with a 
combination and alternation of Wilbur, Bryce, Terrabrush, GeoControl, 
and World Machine on the same height_field, to generate landscapes where 
river valleys are eroded down. Problem is the water and I have not got 
that far indeed. So, I am quite interested in this development. It is 
looking very good!

> It actually gives me an impression of the Scottish Highlands with
> interconnected lochs. It can't be because the sun is shining and it
> doesn't look cold. ;-)
> I like the pattern of vegetation as well.
> How long did it take to parse and render?
>
>

-- 
Thomas


Post a reply to this message

From: Paolo Gibellini
Subject: Re: Tracing the path of streams
Date: 15 Feb 2017 03:35:52
Message: <58a412e8$1@news.povray.org>
Kirk Andrews wrote on 14/02/2017 20:01:
> Hey everyone! Been a long time!
>
> I found myself in need of a creative outlet, and so I dug up my old POV files.
> When last I left off years ago, I had been working on trying to get more
> interesting water formations in my landscapes. I had apparently stopped mid-way
> through a little algorithm for tracing the flow of streams through the
> landscape, forming lakes in the valleys. I decided to try and finish it out a
> little more.
>
I like it, especially the details like rivers and clouds.
Paolo


Post a reply to this message

From: Kirk Andrews
Subject: Re: Tracing the path of streams
Date: 15 Feb 2017 23:35:00
Message: <web.58a52b3fbd8ebaffd61e8dc40@news.povray.org>
Thomas de Groot <tho### [at] degrootorg> wrote:

> Oh, I do! I do! This is coming at a time when I have been wondering how
> to fill those valleys with streams. Lately, I have been working with a
> combination and alternation of Wilbur, Bryce, Terrabrush, GeoControl,
> and World Machine on the same height_field, to generate landscapes where
> river valleys are eroded down. Problem is the water and I have not got
> that far indeed. So, I am quite interested in this development. It is
> looking very good!

> --
> Thomas

That erosion element is the missing piece here, of course. This scene looks like
it's never rained here before, and there are no actual streams or lake beds,
just water pouring over the surface.

I've made some improvements and have been trying to get another render done, but
unfortunately, I seem to be running into a bug with my build of POV running on
this Mac (the last of my PCs died a couple months ago). It'll parse fine, and
start rendering just fine, but it keeps crashing and closing mid render.

You're more than welcome to see what you can do with it though!

https://www.dropbox.com/s/1j0kes0x79u9zz9/Water3.pov?dl=0


Post a reply to this message

From: Kirk Andrews
Subject: Re: Tracing the path of streams
Date: 15 Feb 2017 23:40:01
Message: <web.58a52c59bd8ebaffd61e8dc40@news.povray.org>
Stephen <mca### [at] aolcom> wrote:

> No, to get the water down you just need gravity. :-)
> Seriously, Would you intend to make close ups or an animation? These
> landscapes are generally quite static over short time spans. (I am sure
> Thomas might have an opinion.)
>
> It actually gives me an impression of the Scottish Highlands with
> interconnected lochs. It can't be because the sun is shining and it
> doesn't look cold. ;-)
> I like the pattern of vegetation as well.
> How long did it take to parse and render?
>
>
> --
>
> Regards
>      Stephen

I haven't played too much with animation, but suppose you could. It's not going
to look too fantastic if you do a close up of those streams, since they're made
of cones and spheres. You'd definitely be able to tell that up close.

I've thought that maybe I could switch to building a mesh for the streams
instead; that would probably yield better close-up potential.

At the moment, it takes about half a second per stream to parse. There are about
100 streams in this render. If I don't have other settings cranked up too high,
render times are just a few minutes right now.


Post a reply to this message

From: Kirk Andrews
Subject: Re: Tracing the path of streams
Date: 15 Feb 2017 23:50:00
Message: <web.58a52e61bd8ebaffd61e8dc40@news.povray.org>
Ok, well, I cut way back on the number streams and finally got a finished
render. There's only 10 streams in this one.


Post a reply to this message


Attachments:
Download 'water3_03.jpg' (324 KB)

Preview of image 'water3_03.jpg'
water3_03.jpg


 

From: Thomas de Groot
Subject: Re: Tracing the path of streams
Date: 16 Feb 2017 02:51:11
Message: <58a559ef$1@news.povray.org>
On 16-2-2017 5:45, Kirk Andrews wrote:
> Ok, well, I cut way back on the number streams and finally got a finished
> render. There's only 10 streams in this one.
>

Like you said, with no provision for erosion, the streams here seem more 
artificial then from above, running over the (lowest point) surface. 
Nonetheless, it is impressive in my eyes! I am eager to experiment with 
your code. I just downloaded it, thanks.

-- 
Thomas


Post a reply to this message

From: Stephen
Subject: Re: Tracing the path of streams
Date: 16 Feb 2017 03:16:39
Message: <58a55fe7$1@news.povray.org>
On 2/16/2017 4:36 AM, Kirk Andrews wrote:
> Stephen <mca### [at] aolcom> wrote:
>
>> No, to get the water down you just need gravity. :-)
>> Seriously, Would you intend to make close ups or an animation? These
>> landscapes are generally quite static over short time spans. (I am sure
>> Thomas might have an opinion.)
>>

>
> I haven't played too much with animation, but suppose you could. It's not going
> to look too fantastic if you do a close up of those streams, since they're made
> of cones and spheres. You'd definitely be able to tell that up close.
>
> I've thought that maybe I could switch to building a mesh for the streams
> instead; that would probably yield better close-up potential.
>
> At the moment, it takes about half a second per stream to parse. There are about
> 100 streams in this render. If I don't have other settings cranked up too high,
> render times are just a few minutes right now.
>

They are good parsing times for something that looks complicated.

I only mentioned animation and close ups because you mentioned inertia. 
Which made me think of the lakes draining. But for that I think you 
would need to create the fluid dynamics in SDL or in a third party program.



-- 

Regards
     Stephen


Post a reply to this message

From: Kirk Andrews
Subject: Re: Tracing the path of streams
Date: 16 Feb 2017 09:10:01
Message: <web.58a5b27bbd8ebaffd61e8dc40@news.povray.org>
Thomas de Groot <tho### [at] degrootorg> wrote:
> On 16-2-2017 5:45, Kirk Andrews wrote:
> > Ok, well, I cut way back on the number streams and finally got a finished
> > render. There's only 10 streams in this one.
> >
>
> Like you said, with no provision for erosion, the streams here seem more
> artificial then from above, running over the (lowest point) surface.
> Nonetheless, it is impressive in my eyes! I am eager to experiment with
> your code. I just downloaded it, thanks.
>
> --
> Thomas

Looking forward to seeing what you can do with it!

Maybe you can help me figure out the bugs in my code. The lakes don't seem to be
filling up as much as they should, and I can't seem to figure out why.


Post a reply to this message

From: JimT
Subject: Re: Tracing the path of streams
Date: 16 Feb 2017 12:30:00
Message: <web.58a5e13dbd8ebaffbe7517870@news.povray.org>
"Kirk Andrews" <kir### [at] tektonartcom> wrote:
> Thomas de Groot <tho### [at] degrootorg> wrote:
> > On 16-2-2017 5:45, Kirk Andrews wrote:
> > > Ok, well, I cut way back on the number streams and finally got a finished
> > > render. There's only 10 streams in this one.
> > >
> >
> > Like you said, with no provision for erosion, the streams here seem more
> > artificial then from above, running over the (lowest point) surface.
> > Nonetheless, it is impressive in my eyes! I am eager to experiment with
> > your code. I just downloaded it, thanks.
> >
> > --
> > Thomas
>
> Looking forward to seeing what you can do with it!
>
> Maybe you can help me figure out the bugs in my code. The lakes don't seem to be
> filling up as much as they should, and I can't seem to figure out why.

I'm impressed. Downloaded the code. More impressed that you did this in 426
lines. Rendered and got to 81% in a couple of minutes. The big lake has slowed
things down and it was 22 minutes to finish. 3.0 GHz 4 core I5.

I see what you mean about the lakes not filling up enough to overflow and form a
follow on stream. I'm guessing Thomas will crack the problem before I do.

This is very nice work.

JimT


Post a reply to this message

From: Kirk Andrews
Subject: Re: Tracing the path of streams
Date: 16 Feb 2017 14:00:05
Message: <web.58a5f68bbd8ebaffff6082f0@news.povray.org>
So, I'm starting to get my head around what's happening with the lakes not
filling up. As it searches for a point lower than the water level in an
increasing radius, it doesn't take into account whether or not the water can
actually flow that way.

So, for example, maybe the lake extends away to the north, beyond the current
testing radius, and there is a ridge to south, but then a lower point. Since the
lake extends away to the north, the algorithm detects that as the lowest point
(equal to the current water level), and therefore does not raise the water
level, but does keep expanding the radius. Eventually, it does detect a lower
point, but it's on the other side of the ridge. Right now, the algorithm has no
method to detect that the water can't get there from here, so it goes ahead and
jumps the stream through the rock to the other side.


Post a reply to this message

From: Thomas de Groot
Subject: Re: Tracing the path of streams
Date: 17 Feb 2017 02:54:28
Message: <58a6ac34$1@news.povray.org>
On 16-2-2017 18:28, JimT wrote:
> "Kirk Andrews" <kir### [at] tektonartcom> wrote:
>> Thomas de Groot <tho### [at] degrootorg> wrote:
>>> On 16-2-2017 5:45, Kirk Andrews wrote:
>>>> Ok, well, I cut way back on the number streams and finally got a finished
>>>> render. There's only 10 streams in this one.
>>>>
>>>
>>> Like you said, with no provision for erosion, the streams here seem more
>>> artificial then from above, running over the (lowest point) surface.
>>> Nonetheless, it is impressive in my eyes! I am eager to experiment with
>>> your code. I just downloaded it, thanks.
>>>
>>> --
>>> Thomas
>>
>> Looking forward to seeing what you can do with it!
>>
>> Maybe you can help me figure out the bugs in my code. The lakes don't seem to be
>> filling up as much as they should, and I can't seem to figure out why.
>
> I'm impressed. Downloaded the code. More impressed that you did this in 426
> lines. Rendered and got to 81% in a couple of minutes. The big lake has slowed
> things down and it was 22 minutes to finish. 3.0 GHz 4 core I5.

My initial render was not finished after 4 hours, using 6 cores and i7. 
Just switch to the defined 'WaterTex' texture and forget the one at the 
end of the scene. The culprit probably is the finish. The whole image 
now renders in a couple of minutes.

>
> I see what you mean about the lakes not filling up enough to overflow and form a
> follow on stream. I'm guessing Thomas will crack the problem before I do.

I am not that far yet... ;-)

>
> This is very nice work.
>
> JimT
>
>
>


-- 
Thomas


Post a reply to this message

From: Thomas de Groot
Subject: Re: Tracing the path of streams
Date: 17 Feb 2017 02:59:21
Message: <58a6ad59@news.povray.org>
On 16-2-2017 19:59, Kirk Andrews wrote:
> So, I'm starting to get my head around what's happening with the lakes not
> filling up. As it searches for a point lower than the water level in an
> increasing radius, it doesn't take into account whether or not the water can
> actually flow that way.
>
> So, for example, maybe the lake extends away to the north, beyond the current
> testing radius, and there is a ridge to south, but then a lower point. Since the
> lake extends away to the north, the algorithm detects that as the lowest point
> (equal to the current water level), and therefore does not raise the water
> level, but does keep expanding the radius. Eventually, it does detect a lower
> point, but it's on the other side of the ridge. Right now, the algorithm has no
> method to detect that the water can't get there from here, so it goes ahead and
> jumps the stream through the rock to the other side.
>
>

Ah. That is a complication indeed.

-- 
Thomas


Post a reply to this message

From: Thomas de Groot
Subject: Re: Tracing the path of streams
Date: 17 Feb 2017 03:35:12
Message: <58a6b5c0@news.povray.org>
On 16-2-2017 19:59, Kirk Andrews wrote:
> So, I'm starting to get my head around what's happening with the lakes not
> filling up. As it searches for a point lower than the water level in an
> increasing radius, it doesn't take into account whether or not the water can
> actually flow that way.
>

I used here a height_field where a drainage pattern has been eroded with 
the help of a succession of different applications. As I expected, the 
pattern is not perfect, with ridges barring the drainage courses in 
several places. I have not yet found a single application that does the 
job faultlessly.

However, the code does a good job I think in joining the lowermost areas.

-- 
Thomas


Post a reply to this message


Attachments:
Download 'ka_water3_test.png' (1066 KB)

Preview of image 'ka_water3_test.png'
ka_water3_test.png


 

From: Thomas de Groot
Subject: Re: Tracing the path of streams
Date: 17 Feb 2017 07:52:53
Message: <58a6f225@news.povray.org>
In this particular example, the erosional process seems to have been 
better. A pity I cannot reproduce exactly what I did to get there as I 
was just messing around without paying to close attention to the 
different steps.

-- 
Thomas


Post a reply to this message


Attachments:
Download 'ka_water3_test.jpg' (230 KB)

Preview of image 'ka_water3_test.jpg'
ka_water3_test.jpg


 

From: Kirk Andrews
Subject: Re: Tracing the path of streams
Date: 17 Feb 2017 08:30:01
Message: <web.58a6fab0bd8ebaffd61e8dc40@news.povray.org>
Thomas de Groot <tho### [at] degrootorg> wrote:
> In this particular example, the erosional process seems to have been
> better. A pity I cannot reproduce exactly what I did to get there as I
> was just messing around without paying to close attention to the
> different steps.
>
> --
> Thomas

That's looking really good, Thomas!

Which software are you using for erosion? Now that I don't have a PC anymore,
I've got to find something to run on my Mac.


Post a reply to this message

From: Stephen
Subject: Re: Tracing the path of streams
Date: 17 Feb 2017 08:46:12
Message: <58a6fea4$1@news.povray.org>
On 2/17/2017 1:29 PM, Kirk Andrews wrote:
> Thomas de Groot <tho### [at] degrootorg> wrote:
>> In this particular example, the erosional process seems to have been
>> better. A pity I cannot reproduce exactly what I did to get there as I
>> was just messing around without paying to close attention to the
>> different steps.
>>
>> --
>> Thomas
>
> That's looking really good, Thomas!
>

It does indeed. :-)

> Which software are you using for erosion? Now that I don't have a PC anymore,
> I've got to find something to run on my Mac.
>

FYI
Thomas is a PC user.

I am trying to replicate it in Blender as a goal in learning to use 
Blender. If I get anywhere I will post it here. But there is a lot to 
learn, an awful lot. :)

-- 

Regards
     Stephen


Post a reply to this message

From: Kirk Andrews
Subject: Re: Tracing the path of streams
Date: 17 Feb 2017 09:00:03
Message: <web.58a700b3bd8ebaffd61e8dc40@news.povray.org>
Thomas de Groot <tho### [at] degrootorg> wrote:
> On 16-2-2017 19:59, Kirk Andrews wrote:
> > So, I'm starting to get my head around what's happening with the lakes not
> > filling up. As it searches for a point lower than the water level in an
> > increasing radius, it doesn't take into account whether or not the water can
> > actually flow that way.
> >
> > So, for example, maybe the lake extends away to the north, beyond the current
> > testing radius, and there is a ridge to south, but then a lower point. Since the
> > lake extends away to the north, the algorithm detects that as the lowest point
> > (equal to the current water level), and therefore does not raise the water
> > level, but does keep expanding the radius. Eventually, it does detect a lower
> > point, but it's on the other side of the ridge. Right now, the algorithm has no
> > method to detect that the water can't get there from here, so it goes ahead and
> > jumps the stream through the rock to the other side.
> >
> >
>
> Ah. That is a complication indeed.
>
> --
> Thomas

To do this *right*, I'm thinking you'd have to do a full-blown physics
simulation. But, I'm wondering if we can't get to a reasonable approximation
with some extra trace checks. Right now, it's only checking straight down from
above, but if we also checked across from the center point, maybe we could
eliminate points that didn't have a straight path from here to there. I
experimented with that idea some but I can't tell if it's really working yet.

https://www.dropbox.com/s/49nmnd5z1kzhms0/Water4.pov?dl=0


Post a reply to this message


Attachments:
Download 'water4.png' (1993 KB)

Preview of image 'water4.png'
water4.png


 

From: Kirk Andrews
Subject: Re: Tracing the path of streams
Date: 17 Feb 2017 09:00:04
Message: <web.58a70188bd8ebaffd61e8dc40@news.povray.org>
Stephen <mca### [at] aolcom> wrote:

> > Which software are you using for erosion? Now that I don't have a PC anymore,
> > I've got to find something to run on my Mac.
> >
>
> FYI
> Thomas is a PC user.
>

Oh, I'm sure; but some of them are available on both platforms. I used to use
WorldMachine, but it's PC only.


Post a reply to this message

From: Bald Eagle
Subject: Re: Tracing the path of streams
Date: 17 Feb 2017 10:20:00
Message: <web.58a71383bd8ebaffc437ac910@news.povray.org>
Not sure if this helps any - might be useful as a lead...
Busy at work, but couldn't help peeking

http://ncsu-geoforall-lab.github.io/geospatial-modeling-course/grass/simwe.html

http://www4.ncsu.edu/~hmitaso/gmslab/irwin/irwin1.html

https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=simwe+model

http://geoinfo.amu.edu.pl/sgp/LA/LA17/LA17_081-086.pdf

http://tucson.ars.ag.gov/isco/isco10/SustainingTheGlobalFarm/P081-Mitasova.pdf


Post a reply to this message

From: Kirk Andrews
Subject: Re: Tracing the path of streams
Date: 17 Feb 2017 12:10:00
Message: <web.58a72d8cbd8ebaff66e1985f0@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> Not sure if this helps any - might be useful as a lead...
> Busy at work, but couldn't help peeking
>
> http://ncsu-geoforall-lab.github.io/geospatial-modeling-course/grass/simwe.html
>
> http://www4.ncsu.edu/~hmitaso/gmslab/irwin/irwin1.html
>
>
https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=simwe+model
>
> http://geoinfo.amu.edu.pl/sgp/LA/LA17/LA17_081-086.pdf
>
> http://tucson.ars.ag.gov/isco/isco10/SustainingTheGlobalFarm/P081-Mitasova.pdf

Oh man, looks like I've got reading to do.


Post a reply to this message

From: Kirk Andrews
Subject: Re: Tracing the path of streams
Date: 17 Feb 2017 12:10:00
Message: <web.58a72e5fbd8ebaff66e1985f0@news.povray.org>
> To do this *right*, I'm thinking you'd have to do a full-blown physics
> simulation. But, I'm wondering if we can't get to a reasonable approximation
> with some extra trace checks. Right now, it's only checking straight down from
> above, but if we also checked across from the center point, maybe we could
> eliminate points that didn't have a straight path from here to there. I
> experimented with that idea some but I can't tell if it's really working yet.
>

Or, I suppose it could be as simple as what paint programs do with the fill
tool, and treat it more like square pixels.


Post a reply to this message

From: Samuel B 
Subject: Re: Tracing the path of streams
Date: 17 Feb 2017 13:50:00
Message: <web.58a7456bbd8ebaff102e48c00@news.povray.org>
"Kirk Andrews" <kir### [at] tektonartcom> wrote:
> To do this *right*, I'm thinking you'd have to do a full-blown physics
> simulation.

Hey Kirk,

I'm not sure if this is helpful or not, but if your computer has a GPU
supporting pixel shaders, check out this one I posted a while back:
https://www.shadertoy.com/view/XsKGWG

It approximates hydraulic erosion on a height map, using a sort of basin-filling
method as a key part of the process. It won't form rivers on flat plains, since
momentum isn't taken into account (would need to probably implement
Navier-Stokes equations for that, which would be difficult using Shadertoy since
a fluid sim needs to iterate over a certain operation some 30-50 times per
frame, to the same texture). Also, the lakes seem to be slightly sloped.

Sam


Post a reply to this message

From: Kirk Andrews
Subject: Re: Tracing the path of streams
Date: 17 Feb 2017 15:55:00
Message: <web.58a762ccbd8ebaff66e1985f0@news.povray.org>
"Samuel B." <stb### [at] hotmailcom> wrote:
> "Kirk Andrews" <kir### [at] tektonartcom> wrote:
> > To do this *right*, I'm thinking you'd have to do a full-blown physics
> > simulation.
>
> Hey Kirk,
>
> I'm not sure if this is helpful or not, but if your computer has a GPU
> supporting pixel shaders, check out this one I posted a while back:
> https://www.shadertoy.com/view/XsKGWG
>
> It approximates hydraulic erosion on a height map, using a sort of basin-filling
> method as a key part of the process. It won't form rivers on flat plains, since
> momentum isn't taken into account (would need to probably implement
> Navier-Stokes equations for that, which would be difficult using Shadertoy since
> a fluid sim needs to iterate over a certain operation some 30-50 times per
> frame, to the same texture). Also, the lakes seem to be slightly sloped.
>
> Sam

Wow! I'd never heard of Shadertoy. Is it possible to download the resulting
height map?


Post a reply to this message

From: Samuel B 
Subject: Re: Tracing the path of streams
Date: 17 Feb 2017 18:35:00
Message: <web.58a7881bbd8ebaff102e48c00@news.povray.org>
"Kirk Andrews" <kir### [at] tektonartcom> wrote:
> "Samuel B." <stb### [at] hotmailcom> wrote:
> > "Kirk Andrews" <kir### [at] tektonartcom> wrote:
> > > To do this *right*, I'm thinking you'd have to do a full-blown physics
> > > simulation.
> >
> > Hey Kirk,
> >
> > I'm not sure if this is helpful or not, but if your computer has a GPU
> > supporting pixel shaders, check out this one I posted a while back:
> > https://www.shadertoy.com/view/XsKGWG
> >
> > It approximates hydraulic erosion on a height map, using a sort of basin-filling
> > method as a key part of the process. It won't form rivers on flat plains, since
> > momentum isn't taken into account (would need to probably implement
> > Navier-Stokes equations for that, which would be difficult using Shadertoy since
> > a fluid sim needs to iterate over a certain operation some 30-50 times per
> > frame, to the same texture). Also, the lakes seem to be slightly sloped.
> >
> > Sam
>
> Wow! I'd never heard of Shadertoy. Is it possible to download the resulting
> height map?

It's possible, but will require editing the source code of the Image shader to
have it display only the height map (or water map, or both [hint: the landMap()
and waterMap() functions give this data]). You can then (in Firefox) right click
on the display window and choose Save Image As... Unfortunately this will only
get you an 8 bit image. For 16 bit data, you'll need to convert it over to the
red/green format (which POV-Ray supports) and then save. (For all I know saving
16 bit data from Shadertoy might be possible if you know Java.)

Better yet is to get your own shader program up-and-running using SFML or the
like. (Although the last I heard SFML would only support 8 bit textures, the
devs assuming anything else was unnecessary :P I was able to add 16 bit texture
support myself, but who knows how many versions ago that has been...)

Sam


Post a reply to this message

From: Kirk Andrews
Subject: Re: Tracing the path of streams
Date: 18 Feb 2017 00:10:01
Message: <web.58a7d61dbd8ebaffd61e8dc40@news.povray.org>
"Kirk Andrews" <kir### [at] tektonartcom> wrote:
> > To do this *right*, I'm thinking you'd have to do a full-blown physics
> > simulation. But, I'm wondering if we can't get to a reasonable approximation
> > with some extra trace checks. Right now, it's only checking straight down from
> > above, but if we also checked across from the center point, maybe we could
> > eliminate points that didn't have a straight path from here to there. I
> > experimented with that idea some but I can't tell if it's really working yet.
> >
>
> Or, I suppose it could be as simple as what paint programs do with the fill
> tool, and treat it more like square pixels.

I tell you what. POV SDL was really my first programming experience – it was
really what pulled me into the world of programming, and I'm incredibly thankful
for that. In the years since I left off of POV, I've been doing more and more
coding, mostly in PHP and javascript. So it's a bit of a shock to jump back into
POV and try and code things in SDL, and realize all the things I can't do! It
definitely forces you to get creative. It also makes you think hard about
optimizing your code, since you know any inefficiencies will likely have
significant impacts in parsing time.


Post a reply to this message

From: Thomas de Groot
Subject: Re: Tracing the path of streams
Date: 18 Feb 2017 03:10:10
Message: <58a80162$1@news.povray.org>
On 17-2-2017 14:29, Kirk Andrews wrote:
> That's looking really good, Thomas!

Thanks, yes, especially the second image, which indicates to me that a 
well-behaving substrate does wonders for your little code ;-)

>
> Which software are you using for erosion? Now that I don't have a PC anymore,
> I've got to find something to run on my Mac.
>

I am afraid that most are Windows only.

There is Wilbur http://www.fracterra.com/software.html which does a very 
good job in tracing river patterns but needs a very noisy substrate to 
do it correctly so additional smoothing is necessary (in Wilbur or - as 
I do - in another application);

Terrabrush http://www.cyberfunks.de/page/terrabrush/index.htm is another 
program I use in between but not so good for erosional processes;

GeoControl (which now seems to be WorldCreator I discover) 
http://www.world-creator.com/ is not a free program. It is the heart of 
my height_field creation modules. It does a fair erosion job. I don't 
know about its latest versions though;

World Machine http://www.world-machine.com/ you already know.

I also grabbed a free copy of Bryce 7 when DAZ made it available a few 
years ago. It can generate some interesting height_fields to serve as 
basis for deeper treatment later.

Interestingly, You can make fascinating height_fields with Apophysis 
flames as basis https://sourceforge.net/projects/apophysis/ . Loaded 
into GeoControl for instance, the pattern is transformed into an 
interesting landscape.

-- 
Thomas


Post a reply to this message

From: Thomas de Groot
Subject: Re: Tracing the path of streams
Date: 22 Feb 2017 07:17:56
Message: <58ad8174@news.povray.org>
On 17-2-2017 14:54, Kirk Andrews wrote:
> To do this *right*, I'm thinking you'd have to do a full-blown physics
> simulation. But, I'm wondering if we can't get to a reasonable approximation
> with some extra trace checks. Right now, it's only checking straight down from
> above, but if we also checked across from the center point, maybe we could
> eliminate points that didn't have a straight path from here to there. I
> experimented with that idea some but I can't tell if it's really working yet.
>
> https://www.dropbox.com/s/49nmnd5z1kzhms0/Water4.pov?dl=0
>

This version does interesting things, different from the previous one. I 
am not entirely sure if it solves the problem and I need to investigate 
further.

-- 
Thomas


Post a reply to this message


Attachments:
Download 'ka_water4.jpg' (210 KB)

Preview of image 'ka_water4.jpg'
ka_water4.jpg


 

From: Thomas de Groot
Subject: Re: Tracing the path of streams
Date: 22 Feb 2017 07:47:40
Message: <58ad886c@news.povray.org>
On 22-2-2017 13:17, Thomas de Groot wrote:
> This version does interesting things, different from the previous one. I
> am not entirely sure if it solves the problem and I need to investigate
> further.
>

I think it is worthwhile to re-think the random starting point code as 
the existing one has not a coverage including the complete terrain.

I use RRand() from rand.inc (to be included into the scene) in the 
following manner:

First, add the following lines after the height_field making:

#declare Min = min_extent(Terrain);
#declare Max = max_extent(Terrain);

Then replace the line:

   #declare Pos = trace(ThisTerrain, <rand(r)-.55, 10*Flattening, 
rand(r)-.55>*0.9*TS, -y);

by:

   #declare Pos = trace(ThisTerrain, <RRand(Min.x, Max.x, r), 
10*Flattening, RRand(Min.z, Max.z, r)>, -y);

The result is shown in the attached image, searching for 100 streams I 
commented out the black cones).

-- 
Thomas


Post a reply to this message


Attachments:
Download 'ka_water4.jpg' (186 KB)

Preview of image 'ka_water4.jpg'
ka_water4.jpg


 

From: Bald Eagle
Subject: Re: Tracing the path of streams
Date: 22 Feb 2017 08:05:00
Message: <web.58ad8bc4bd8ebaffc437ac910@news.povray.org>
Thomas de Groot <tho### [at] degrootorg> wrote:

> I use RRand() from rand.inc (to be included into the scene) in the
> following manner:

Can you also use VRand_In_Obj ?

What ..... stream are you using?   :D


Post a reply to this message

From: Thomas de Groot
Subject: Re: Tracing the path of streams
Date: 23 Feb 2017 03:17:06
Message: <58ae9a82@news.povray.org>
On 22-2-2017 14:01, Bald Eagle wrote:
> Thomas de Groot <tho### [at] degrootorg> wrote:
>
>> I use RRand() from rand.inc (to be included into the scene) in the
>> following manner:
>
> Can you also use VRand_In_Obj ?

Yes, of course. It is a matter of taste imho.

Another interesting option would be to use a pigment_pattern, or an 
image_pattern of a flow map, and only allow for streams to start from 
the higher grounds. Hmm... going to have to implement that...

>
> What ..... stream are you using?   :D
>

:-) ?

-- 
Thomas


Post a reply to this message

From: Thomas de Groot
Subject: Re: Tracing the path of streams
Date: 23 Feb 2017 07:15:12
Message: <58aed250@news.povray.org>
Overall, I think that version 4 is doing a good job and solves the 
problem of version 3. The attached image demonstrates that. Never mind 
the columns for supporting the sky ;-) Those are little troubles at the 
height_field's edges.

-- 
Thomas


Post a reply to this message


Attachments:
Download 'ka_water4.jpg' (180 KB)

Preview of image 'ka_water4.jpg'
ka_water4.jpg


 

From: Kirk Andrews
Subject: Re: Tracing the path of streams
Date: 23 Feb 2017 10:15:01
Message: <web.58aefbe8bd8ebaffd61e8dc40@news.povray.org>
Thomas de Groot <tho### [at] degrootorg> wrote:
> Overall, I think that version 4 is doing a good job and solves the
> problem of version 3. The attached image demonstrates that. Never mind
> the columns for supporting the sky ;-) Those are little troubles at the
> height_field's edges.
>
> --
> Thomas

Nice work, Thomas!

Would you be willing to share some of your eroded landscape height maps?


Post a reply to this message

From: omniverse
Subject: Re: Tracing the path of streams
Date: 23 Feb 2017 16:05:00
Message: <web.58af4e45bd8ebaff9c5d6c810@news.povray.org>
Thomas de Groot <tho### [at] degrootorg> wrote:
> On 22-2-2017 13:17, Thomas de Groot wrote:
> > This version does interesting things, different from the previous one.

Fascinating stuff, as I watch fervently from the sidelines.

Has me wondering if erosion could be accomplished via difference {} using
likewise cone+sphere stream/lake creation method.

Bob


Post a reply to this message

From: Thomas de Groot
Subject: Re: Tracing the path of streams
Date: 24 Feb 2017 02:46:59
Message: <58afe4f3$1@news.povray.org>
On 23-2-2017 22:04, omniverse wrote:
> Thomas de Groot <tho### [at] degrootorg> wrote:
>> On 22-2-2017 13:17, Thomas de Groot wrote:
>>> This version does interesting things, different from the previous one.
>
> Fascinating stuff, as I watch fervently from the sidelines.
>
> Has me wondering if erosion could be accomplished via difference {} using
> likewise cone+sphere stream/lake creation method.
>

You have had the same thought as I! This should not be too difficult to 
do in principle. Something to explore...


-- 
Thomas


Post a reply to this message

From: Mr
Subject: Re: Tracing the path of streams
Date: 24 Feb 2017 05:10:00
Message: <web.58b005f3bd8ebaff16086ed00@news.povray.org>
Thomas de Groot <tho### [at] degrootorg> wrote:
> On 23-2-2017 22:04, omniverse wrote:
> > Thomas de Groot <tho### [at] degrootorg> wrote:
> >> On 22-2-2017 13:17, Thomas de Groot wrote:
> >>> This version does interesting things, different from the previous one.
> >
> > Fascinating stuff, as I watch fervently from the sidelines.
> >
> > Has me wondering if erosion could be accomplished via difference {} using
> > likewise cone+sphere stream/lake creation method.
> >
>
> You have had the same thought as I! This should not be too difficult to
> do in principle. Something to explore...
>
>
> --
> Thomas

Indeed I hope so, erosion really adds so much to a procedural landscape!


Post a reply to this message

From: Kirk Andrews
Subject: Re: Tracing the path of streams
Date: 24 Feb 2017 09:30:00
Message: <web.58b042f1bd8ebaffd61e8dc40@news.povray.org>
"omniverse" <omn### [at] charternet> wrote:
> Thomas de Groot <tho### [at] degrootorg> wrote:
> > On 22-2-2017 13:17, Thomas de Groot wrote:
> > > This version does interesting things, different from the previous one.
>
> Fascinating stuff, as I watch fervently from the sidelines.
>
> Has me wondering if erosion could be accomplished via difference {} using
> likewise cone+sphere stream/lake creation method.
>
> Bob

Looks like that was something I was trying out, back in 2008. Looks like I was
rendering out a flat image of just the rivers to be subtracted from the height
map image.


Post a reply to this message


Attachments:
Download 'together_rivers.jpg' (336 KB)

Preview of image 'together_rivers.jpg'
together_rivers.jpg


 

From: omniverse
Subject: Re: Tracing the path of streams
Date: 24 Feb 2017 15:05:01
Message: <web.58b0918fbd8ebaff9c5d6c810@news.povray.org>
"Kirk Andrews" <kir### [at] tektonartcom> wrote:
> "omniverse" <omn### [at] charternet> wrote:
> >
> > Has me wondering if erosion could be accomplished via difference {} using
> > likewise cone+sphere stream/lake creation method.
>
> Looks like that was something I was trying out, back in 2008. Looks like I was
> rendering out a flat image of just the rivers to be subtracted from the height
> map image.
Sure does mess with my eyes! I turned it upside down, sideways too, and those
shadows just wouldn't get right for me.

Maybe I'm seeing it wrong but the tributaries appear to begin or end at the
lower elevations with pooling water at the higher elevations.

Does give the appearance of eroded ground anyhow regardless of how I see it.


Post a reply to this message

From: Thomas de Groot
Subject: Re: Tracing the path of streams
Date: 25 Feb 2017 02:53:56
Message: <58b13814$1@news.povray.org>
On 24-2-2017 15:28, Kirk Andrews wrote:
> "omniverse" <omn### [at] charternet> wrote:
>> Thomas de Groot <tho### [at] degrootorg> wrote:
>>> On 22-2-2017 13:17, Thomas de Groot wrote:
>>>> This version does interesting things, different from the previous one.
>>
>> Fascinating stuff, as I watch fervently from the sidelines.
>>
>> Has me wondering if erosion could be accomplished via difference {} using
>> likewise cone+sphere stream/lake creation method.
>>
>> Bob
>
> Looks like that was something I was trying out, back in 2008. Looks like I was
> rendering out a flat image of just the rivers to be subtracted from the height
> map image.
>

The water seems to be above the surface. Also, stream patterns do not 
take the underlying landscape into account, with patterns happily 
crossing peaks. I guess that the pattern was not derived from this 
particular landscape but was just superposed on it for testing's sake. 
Using a flow map generated from a particular landscape that would be 
possible to do indeed. Wilbur, amongst others, can make such maps.

-- 
Thomas


Post a reply to this message

From: Thomas de Groot
Subject: Re: Tracing the path of streams
Date: 25 Feb 2017 04:06:48
Message: <58b14928@news.povray.org>
On 23-2-2017 16:12, Kirk Andrews wrote:
> Would you be willing to share some of your eroded landscape height maps?
>

They can be found now in p.b.misc. I had to convert them from tga to png 
in order to reduce the size. But they work the same.

There was one example of a degenerate cylinder crashing the scene. Some 
control on the hf margins seems to be necessary.

-- 
Thomas


Post a reply to this message

From: clipka
Subject: Re: Tracing the path of streams
Date: 25 Feb 2017 04:29:27
Message: <58b14e77$1@news.povray.org>
Am 25.02.2017 um 08:53 schrieb Thomas de Groot:

> The water seems to be above the surface. Also, stream patterns do not
> take the underlying landscape into account, with patterns happily
> crossing peaks. I guess that the pattern was not derived from this
> particular landscape but was just superposed on it for testing's sake.
> Using a flow map generated from a particular landscape that would be
> possible to do indeed. Wilbur, amongst others, can make such maps.

No, the image is ok. It's just surprisingly difficult to flip your brain
in the right direction, if you know what I mean.


Post a reply to this message

From: Thomas de Groot
Subject: Re: Tracing the path of streams
Date: 25 Feb 2017 07:16:59
Message: <58b175bb$1@news.povray.org>
On 25-2-2017 10:29, clipka wrote:
> Am 25.02.2017 um 08:53 schrieb Thomas de Groot:
>
>> The water seems to be above the surface. Also, stream patterns do not
>> take the underlying landscape into account, with patterns happily
>> crossing peaks. I guess that the pattern was not derived from this
>> particular landscape but was just superposed on it for testing's sake.
>> Using a flow map generated from a particular landscape that would be
>> possible to do indeed. Wilbur, amongst others, can make such maps.
>
> No, the image is ok. It's just surprisingly difficult to flip your brain
> in the right direction, if you know what I mean.
>

I am not convinced. There is something absolutely wrong comparing the HF 
shadows and the stream shadows. It would certainly help to convince me 
if the camera view point was lower. ;-)

-- 
Thomas


Post a reply to this message

From: Kirk Andrews
Subject: Re: Tracing the path of streams
Date: 25 Feb 2017 11:35:03
Message: <web.58b1b135bd8ebaffd61e8dc40@news.povray.org>
> The water seems to be above the surface. Also, stream patterns do not
> take the underlying landscape into account, with patterns happily
> crossing peaks. I guess that the pattern was not derived from this
> particular landscape but was just superposed on it for testing's sake.
> Using a flow map generated from a particular landscape that would be
> possible to do indeed. Wilbur, amongst others, can make such maps.
>
> --
> Thomas

Well, I certainly make no promises that anything is really obeying the laws of
physics, but I think the main problem with the images is some artifacts around
the edges of the terrain that make it difficult to understand where the light is
coming from. There are things that look like shadows that are actually the
repeating edge of the height map coming though.


Post a reply to this message


Attachments:
Download 'together2.png' (2832 KB)

Preview of image 'together2.png'
together2.png


 

From: Kirk Andrews
Subject: Re: Tracing the path of streams
Date: 25 Feb 2017 15:15:03
Message: <web.58b1e479bd8ebaffd61e8dc40@news.povray.org>
Thomas de Groot <tho### [at] degrootorg> wrote:
> On 23-2-2017 16:12, Kirk Andrews wrote:
> > Would you be willing to share some of your eroded landscape height maps?
> >
>
> They can be found now in p.b.misc. I had to convert them from tga to png
> in order to reduce the size. But they work the same.
>
> There was one example of a degenerate cylinder crashing the scene. Some
> control on the hf margins seems to be necessary.
>
> --
> Thomas

Thanks for sharing those, Thomas. I'm pretty happy with the way the streams are
flowing on a terrain with erosion factored in!


Post a reply to this message


Attachments:
Download 'water4_tghf_1.png' (3875 KB)

Preview of image 'water4_tghf_1.png'
water4_tghf_1.png


 

From: omniverse
Subject: Re: Tracing the path of streams
Date: 25 Feb 2017 19:40:00
Message: <web.58b22329bd8ebaff9c5d6c810@news.povray.org>
"Kirk Andrews" <kir### [at] tektonartcom> wrote:
> Thomas de Groot <tho### [at] degrootorg> wrote:
> > On 23-2-2017 16:12, Kirk Andrews wrote:
> > > Would you be willing to share some of your eroded landscape height maps?
> > >
> >
> > They can be found now in p.b.misc. I had to convert them from tga to png
> > in order to reduce the size. But they work the same.
> >
> > There was one example of a degenerate cylinder crashing the scene. Some
> > control on the hf margins seems to be necessary.
> >
> > --
> > Thomas
>
> Thanks for sharing those, Thomas. I'm pretty happy with the way the streams are
> flowing on a terrain with erosion factored in!

Yep, that's good. Other rendering before this really shows the correct stream
flow for elevation, too. Thanks for that, I won't try and look at the other
again to save my eyes/brain. LOL


Post a reply to this message

Goto Latest 50 Messages Next 27 Messages >>>

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