Make river?

Started by Dune, August 04, 2009, 03:34:10 AM

Previous topic - Next topic

Dune

I am on the verge of a breakthrough in my quest for downhill waterflows. Image coming up soon, is now rendering. But I would greatly appreciate if someone came up with a method to map out the flow of a river from point 1 to another somewhere downhill. Either in TG or PS (or WM).
I now use the painted shader to define where a river goes, but it's kind of tricky finding the lowest parts in the terrain. The method I'm looking for should look for the next lower grade of 'whiteness' (or height) form point 1, within a certain boundary (actual height +10 or -10, or so), and so forth downward, creating a line. This line will sometimes be wide (forming a lake perhaps), sometimes thin, as I can imagine. This should be usable as a map/mask.
I look forward to all your suggestions...

---Dune

Hetzen

I had a go at this with Smooth Terrain and an offset, which worked to a degree, the problem was getting the offset to work perpendicular to the river cut without the Plain with a water shader rising above or disappering from the landscape at certain angles of slope.

My original intention was to use the input of a Get Position function to return an average of the altitude within an area defined by +/- say 10m in x/z within the confines of a mask. The problem explained to me by Matt, was that the Get functions make no use of the input on their node, and the reason why they have an input is a quirk of the UI structure of TG.

Henry Blewer

There is a height field operation which will carve rivers. It would be easier to use if it had a generate now button. I have used it. It works well, but there is only the start point and end point coordinates to define the length. The cut follows the low points of the terrain. The cut is also very adjustable with straight forward controls. (They are self explanatory)
http://flickr.com/photos/njeneb/
Forget Tuesday; It's just Monday spelled with a T

Dune

Thanks guys. I knew about the river carving, but never actually got it to work. Never actually put much effort in it, to be honest. I did now, and the results are very promising. It does take some fidling and trying to get the right river.
My trick (in short) is now to make a heightfield, feed this into river making, and on to the planet. Feed another one from the heightfield into a compute terrain (larger patch, smooth terrain), feed this into a displacement shader (downward), and on into a lake. A colour adjust is also handy to put in, to change the black-white values. For fast testing I put a surface shader instead of the water shader. If you now change the river, it is easy to see what changes.
I will now try to get the water plane as horizontal as possible (perpendicular to the banks), perhaps by displacing the 'lake terrain' down by his inversed 'self' so to speak, and raise it again with a constant. See what happens.

---Dune

Henry Blewer

That is a good suggestion, using a default shader. I always just use the water shader.
http://flickr.com/photos/njeneb/
Forget Tuesday; It's just Monday spelled with a T

Oshyan

World Machine and Geocontrol both have great river making functions these days, though I don't know the details of using either one.

- Oshyan

CCC

World Machine has a River Bed Macro but i don't know where it is. Here is a link to a Beach Macro and River 2 Device for World Machine.

http://forum.world-machine.com/index.php?topic=55.0

Now GeoControl does the best rivers i have ever seen. See here:

http://www.geocontrol2.com/e_geocontrol_completed.htm


That is if anyone has or will have either of these applications.


Dune

Thanks for the links and advice, very helpful. In the meantime I've rendered a river with the two terrains mixed (one fed into a lake), and it turns out quite nice. The only problem is to find suitable areas where the original land is not too distorted perpendicular to where you want your river (or you'll get angled water). Here's an image.
I now want some cascades, but the strata and outcrops is a bit too harsh, it needs softer steps. Some painted shaders would work, but I want something simpler (nodes). And I need to find a way to get the rocks wet just above the water. Again a painted shader would work, but is a bit difficult to paint. I've merged (difference) the two terrains to form some sort of river mask, with a modify colour attached to narrow or widen the area, and it worked only a little. And I didn't have time to pursue it.

---Dune

Tangled-Universe

Looks cool so far! Great work!
For the strata you might ask Efflux for some advice, he's working on function-based strata which can be made very smooth.

Martin

SeerBlue

If you are looking to make a mask of the rivers flow for a ter file from TG, Wilbur at http://www.ridgenet.net/~jslayton/wilbur.html will generate an image file of the flow from your ter file, just open the ter, go to texture, other maps, river flow.
You can set the colors for the image in the pop up dialogue and output it.
I haven't done it myself, I use Saga-gis for masks, but that takes more steps and alot more time, but is accurate.   

Hetzen

Thank you for that. I've not seen that app before, looks very useful and may help. The problem we're having here is in distorting a plain to run along the river channel down hill, yet keeping it 'flat', so that we can apply a water shader to it to get the transparency and see the land underneath. This app may help us to specify two depths of cut in seperate terrain files, one for the channel, the other for the water surface (with an additional image mask, to cut out unnecessary water calculations at render). Hrmm, need to play with this a little.

himalofa

I know this is a bit late but I have just started with TG2 and one thing I need is to be able to do good rivers easily. I have been experimenting with GeoControl2. If you make a river with this and set it to filled and the height to something around 75% you get a river channel with a flat base and a mask. This seems to be what you are asking. I have been getting fair results but still a way to go. I use DEM's as I am trying to re create real world scenes. Attached is an early attempt on the Gori Ganga in the Indian Himalaya.


Henry Blewer

Did you try a water shader with the rough water? It may help. This is a very good render for a DEM file. As you get better, the terrain can be made to look more realistic. This would work for many people in print and video as it is.
My advise would be to learn how to use power fractals. I resisted using many when I started using Terragen 2. This link will take you to the best 'lesson' on using them I have read.
http://forums.planetside.co.uk/index.php?topic=2287.msg22357#msg22357
http://flickr.com/photos/njeneb/
Forget Tuesday; It's just Monday spelled with a T

himalofa

QuoteDid you try a water shader with the rough water?

It is a water shader but needs more work as I am still feeling my way around, I don't understand how depth works when the shader is applied to a surface with nothing below, as it would with a lake object. I am having some trouble keeping the trees out of the water. I can exclude them with the image mask but if I add that to a distribution shader and include some enviromental restraints they go back into the river. This may be a question for a new thread.

I will take your advice on power fractals and study the link.

Henry Blewer

Someone, and I can't remember the link or subject, did a render here. The water shader was applied to a plane object. Below this was the terrain, shaded to look like a riverbed. Somehow he used functions to get the plane to change shape in response to the underlying terrain. It look really good.
http://flickr.com/photos/njeneb/
Forget Tuesday; It's just Monday spelled with a T