Planetside Software Forums

General => Terragen Discussion => Topic started by: Ariel DK on December 03, 2016, 02:44:09 PM

Title: water render issue
Post by: Ariel DK on December 03, 2016, 02:44:09 PM
I'm going to the point: there is some way to avoid that the water was rendered below the surface?
I cant find nothing about, in the forum ??? thanks in advance...
Title: Re: water render issue
Post by: fleetwood on December 03, 2016, 04:02:28 PM
The easiest thing to do is look at the Lake node. It has a parameter called Sorting Bias.
Set the Sorting Bias to a large negative number like -10000. This helps by giving the water a low priority.

There are also some ways of masking out unused areas of water.  If you search for "masking water" you may find some info, but Dandel0's files on masking out water seem to have been removed.
Title: Re: water render issue
Post by: Dune on December 04, 2016, 02:41:55 AM
This has been dealt with earlier, and files are available. I'll explain the principle again: you can use a displacement to scalar to obtain a black and white map of heights, where you use a color adjust to find the range you need to cover just that height where water needs to be rendered. Output into the opacity tab of a default shader, make its color black and output into the input of a colorless surface shader. Add your water shader as child. Output the surface shader into the lake/plane/sphere.
Painted maps will also work of course. Even if rendering a very fast view and painting it over in Photoshop with white where the water should be visible, the rest blackened, and using that image projected by the render cam as a mask for that default shader's opacity tab will work nicely.
And the bias of course. 
Title: Re: water render issue
Post by: KyL on December 04, 2016, 10:22:26 AM
this is probably what you want:
http://www.planetside.co.uk/forums/index.php/topic,8793.15.html

there is a .tgd file available on the second page  ;)
Title: Re: water render issue
Post by: Ariel DK on December 04, 2016, 06:52:49 PM
thanks guys, Im work on a Glacier Lake scene.
I have most of the scene completed, and for now, Im trying to optimize it as much as I can.

@fleetwood: I tried that, but in my case the water becomes very noisy, and I need some pebbles visible in shallows. thanks by anyway!

@Dune: thanks for the clear explanation, I know that a Displacement to Scalar is "the way", but I could not make it work... until now. so, lets see what hapend

@KyL: thank you for the link, is very useful, but donst work for me, because Im using a DEM for the terrain, and the merge shader cannot calculate the values correctly.
Title: Re: water render issue
Post by: fleetwood on December 04, 2016, 08:02:46 PM
"@fleetwood: I tried that, but in my case the water becomes very noisy, and I need some pebbles visible in shallows. thanks by anyway!"

More noise seems like a strange result for a change in the sorting bias parameter. I guess I'd be inclined to wonder if any added water noise came from some other change.
All I can say is that changing the sorting bias number has never changed even a tiny detail of the water surface in my own tests.