terrain as rivers

Started by SeerBlue, August 08, 2008, 02:29:09 PM

Previous topic - Next topic

SeerBlue

I know the image doesn't look like much, its a crop from a test I have been working on to us two heightfileds, one which is the terrain and a second which is the water which flows over it. I left the surface flat so I can see thru it, but waves can be applied via the water shader, as well as volume color.
After alot of failures, mostly because I had opacity and translucency reversed in my noggin, I finally got it to work. So, in theory, I can now move onto making a water terrain, again, of a me-dem terrain of the Anduin Vale in Middle Earth with the Anduin River and oodles of smaller rivers and streams, and then have water which flows over the terrain AND allows you to see thru the depth of it to the terrain/riverbed below.
This test is done with just a chunk from the base terrain pulled out in leveller and a quick water surface modelled in Leveller. The bigger render has some errors, I forgot to enable a few slope controlled shaders before I hit render and went to bed, so the inset shows what the banks look like.
It is hard to see, but at the bottom of the river are rocks from a fake stones clip downloaded from here, these are applied only to the base terrain, and then there is the water surface which is its own heightfield. It is not a lake object, it actually slopes 5 meters in 500 meters, while the riverbed drops 15 meters in 500 meters.
The biggest headache is making and adjusting the image masks for the merge shader.
Hopefully now I can generate a few water terrains from the 4097x4097 me-dem project Anduin Vale terrain and finally get a good river/stream network that has transperancy and depth. It will take more than the 2 terrains used here as the river will need different shaders/depth than the streams...
So, back to it.
SeerBlue

fmtoffolo

i worked on something like this some time ago

http://forums.planetside.co.uk/index.php?topic=1051.0

http://forums.planetside.co.uk/index.php?topic=1170.msg11765#msg11765

Actually, I was going to make a transparency render today to test the new build! lol :)

My Terragenn site
www.cgworlds.com.ar

SeerBlue

what i have found so far is that  your water terrain needs opacity and tranluscency settings in a default shader otherwise once the water shader is applied to the water terrain you wil "see" what ever color you have for that surface layer. So to see thru the waterterrain to the underlying terrain the water terrain has to be "invisible" first. I use a tga mask of where the water terrain is to apply a default shader to the water terrains surface shader, so its opacity and translucency can be adjusted. then the water shader works....the fun starts with the merge shader to bring the two heightfields, their displacement, and colour together.
SeerBlue

fmtoffolo

here is a quick render i did yesterday  with transparency

My Terragenn site
www.cgworlds.com.ar

rcallicotte

Transparency is so much fun.  Nice little river there.
So this is Disney World.  Can we live here?

Mahnmut

Looking foreward to seeing the great Anduin!

SeerBlue

Looks good fmtoffolo, I would be interested in seeing your tgd, I like the look of your water, and the way it blends along the banks, I don't see any masking artifacts, like I get at odd spots in mine.
SeerBlue

fmtoffolo

my tgd is actually pretty simple

here you go
My Terragenn site
www.cgworlds.com.ar

rcallicotte

#8
Cool.  Thanks!

Would you do us a favor and put this TGD into the File Sharing section at the top under Procedural Terrain Library?  We're working on getting a collection of various files to be easily accessible by all of us.  I can do it, but I want you to get credit.

So this is Disney World.  Can we live here?

SeerBlue

Another use of terrain as water is waves, though simple waves at this point. in the short animated gif (if I can upload it) that follows the water terrain is merged with the heightfield and then shifted for each frame, as is its mask. This is a quick  20 minute test using a setup I already had and a simple waves heightfield generated with Leveller.
SeerBlue

SeerBlue

#10
here is an improved animated gif of simple waves, using a  separate terrain as water. still some errors with my masks but it is getting better. Still no foam as I haven't the foggiest idea how to add that.
Its just 19 or so 3 minute renders to see how it works before putting much more into it.
SeerBlue 

monks

Yay, really cool!!
I think foam done well would clinch this...

monks