water level hight issue

Started by deepee, March 14, 2013, 12:01:03 AM

Previous topic - Next topic

deepee

Hello , when creating a lake object and giving it a specific water level.
i want to be able to match the water level with a shader colour on the terrain that it
intersects , eg making a beach darker as if it is wet . but when i copy altitude coordinates they dont match the water level .
what is the proper way to find out any given altitude on any given terrain?

thanks for any help  :)

Dune

The water level is only equal to the Y of the location at 0/0/0, because the Y changes further from the 'north pole'. For the rest you'd have to hover the mouse/pen over the beach area and right click to know the Y. But if you need to make a shader matching the water level, best is to use a distribution shader as a blender for that surface. Set it to 'final position' and use a test color in the surface shader to refine height and fuzzy zone. Can you manage now?

deepee

would the set max/min altitude on a surface shader work too ?

Dune

I have to edit what I wrote earlier. It seems I wasn't thinking properly, as it does seem to work differently than I thought. Check this tgd; water level at zero seems constant across the globe. And using the height in a surface shader works well as well, as long as you don't check 'use Y for altitude'. Because the Y does differ and is taken from a kind of flat plane balancing on 0/0/0.
If using a distribution shader 'altitude in texture/terrain' takes the Y, so 'final position' is the proper one to use for shore lines, as this takes the height at that moment in the line of shaders. 
It may be that adding more displacements will change the height taken in the surface shaders, so that in a more complicated setup, a distribution shader should be the best to use for exact heights in shore situations, as this computes the 'final' height.
I'm sure there are others who can explain this better.