Rivers

Started by SeerBlue, March 03, 2007, 01:55:27 PM

Previous topic - Next topic

SeerBlue

 Some pics of rivers going into a WIP image of Monkschain's Mindol terrain from the ME-DEM Project, still alot of work to do, like surfacing and mask tweaking. The masks for all the watercourses were generated with Saga Gis.
Now if I could just figure out how to selectively lower and modify the heightfield via the watercourse masks, so the "water" will have a different structure than the adjoing terrain, I would be very happy.
Works best for high shots, get down to close and it is apperent that it is a water shader on the heightfield, that is why I would like to be able to modify just the watercourses beneath the shader....my attempts to do so have been less than good. Otherwise I guess it comes down to modifying the watercourses in Levelleler or Wilbur via masks.

Any suggestions, oh I would post the tgd and files for sharing, but it is a big zip, perhaps I will put it up at http://www.me-dem.org/  once the ftp is changed over.

fmtoffolo

mmm, this looks very very interesting. And it promises a lot! I'll be keeping an eye in this post!
Keep on working!
My Terragenn site
www.cgworlds.com.ar

old_blaggard

Nice job with the masking.  I can't wait to see what the final product of this is.
http://www.terragen.org - A great Terragen resource with models, contests, galleries, and forums.

Dark Fire

That masking is a very clever idea to make rivers, and it looks very convincing...

mrwho

I was playing with a similar idea, but yours looks better

SeerBlue

There is a tutorial on the ME-DEM Project site, http://www.me-dem.org/content/view/53/33/, which details how to use Saga Gis to extract a whole range of images which can be used to mask the terrain for rivers. The tutorial is about 90 pages long and explains everything needed to get a .ter file into Saga Gis and how to manipulate the output for use in various terrain programs. (Terragen, Wilbur, Leveller)
It does not have anything about TGTP, as I have not worked out the best way yet, and so have not updated it.
Nearly all the programs used in the tutorial are free. 
SeerBlue

fmtoffolo

Hey! i've been playing around a bit because of your inspiring pics and tried a river myself. Mine are more of fast raging rivers. Not so calm.

Take into account they are just WIPS ;D
My Terragenn site
www.cgworlds.com.ar

SeerBlue

Now that looks good, how about a look at your tgd, I have not been able to get that water within river banks look, great work SeerBlue

RedSquare

Especially river2. Now that looks very realistic, Oh for some white caps and foam. ;D

Dark Fire

Those rivers look amazing. Please share...

monks

Nice work Seer!

I like those rapids fmt- the second one looks impossible but with a higher river behind it, it would look swell.

monks

Oshyan

You could try connecting your river mask to a displacement shader on the terrain and using a negative offset to get your rivers "sunk" into the terrain a bit...

- Oshyan

SeerBlue

Thanks Oshyan, I had an IMS and Displacement Shader in there, but your post made me go back and look at it, I missed setting it to plan y, so it was still on thru camera, which expalins why I got really wierd displacement every time I moved the camera to different viewpoints.  here is a hi view of several of the rivers in the terrain. Now I have to work at blending the mask better so some of the smaller streams don't dead end and just show as the light tan lines SeerBlue

SeerBlue

#13
Darkfire, here is a cap of the set up I am using, I pretty much have 2 Image Map Shaders (labelled IMS, and then whatever masks it uses, as I switch back and forth to see what works best). All the masks are generated in Saga Gis from the heightfield/ter, and then tweaked in PS (all those steps are in the tutorial linked above at ME-DEM Project).
The river mask is simply a greyscale image with the river channels towards white, terrain black, this is what the watershader goes into, and is the same mask used to apply the displacement shader to the ter.
The Image map shader (IMS stream power channels 3) runs to both a merge shader and a color adjust shader.

I use a inverted version of the channel mask to control the rest of the surfacing, I think I also gave it a little gaussian blur to soften it..It runs into a color adjust shader and then into the base color shader.

Then the output from the last surface shader is run into the input on the merge shader which has the water shader, IMS stream power channels 3 (connected to the merge shaders A input), and color adjust ( connected to the mix controller) flow going into it.
The color adjust shader is used to tweak the mask and the settings in the merge shader are used to set the color and displacement merge type.
I will try to post the tgd tommorw, once I give the different nodes sensible names.
One thing I have noticed with the image shader is that in order to get it to overlay on the terrain right, so the small thin channels get water in the bottom and not the sides, is that I have to offset the x and y placement by the meter spacing of my terrain. For example this terrain uses 12.5 meters per pixel so the  lower left corner had to be set at 12.5 0 12.5 in the Imae map shader setup to match the terrain     
SeerBlue

SeerBlue

 Something I have noticed is that when applying the watershader is that in areas of the channel where the height is different to a large degree from one "bank" to the other is that it is difficult to apply smooth water that does not slant to the low side,,, such as in bends where the channel is more eroded in the outer radius of the bends. In nature the waterplane would be level, pretty much, across the width.
It would be nice if there was some way to read the x,y, and z coordinates all along the edges of the mask and then set the height of the channel to the mid point between the high and low (if the was a large difference) of the mask/channel sides so that there was a level waterplane to apply the shader to. Then one would end up with a surface that is level from bank to bank but rises/drops along the channels run.
Now, I think in order to do this, one would have to be able to determine where the edges of the mask where from any given point within it, (as in smallest distance from position x,y to edges is width of channel, longest distance is along the lenght of channel) so that the function could determine where the banks were. Otherwise one could end up creating a canyon along the length of the river, instead of leveling bank to bank.
Probably not possible, but it would be nice if it was. SeerBlue