## getting sloped altitude?

Started by Dune, April 05, 2024, 04:50:44 AM

#### Dune

I thought I had the solution once, but can't seem to find it anymore. Can anyone shed some light on this. I have a sloping terrain and part of it is lowered for a river. I need to have the altitude of that terrain for a sloping altitude mask (to make a wet waterline going downhill with the river).
I know a say zero altitude mask (position in terrain) can be warped by something (displacement, or vector displaced scalar), but I can't get it to work.
Added a basic test, which is just a start...

#### Dune

Nobody smart enough? Here's an example where I would need water altitudes to determine the altitude of a wet waterline on the shore (especially where it's just mud or rock of course). Or the altitudes of the river bed itself as a mask. Slope here is the red line, but I can imagine steeper situations.
Also if no compute terrain is used (like here).

#### aknight0

Dune's a pretty smart guy, did you ask him?

https://planetside.co.uk/forums/index.php?msg=298496

Sorry, couldn't resist.  Would that same solution work for this situation?

#### Dune

I asked him, but he's doubting his intelligence atm. and about to quit.

No, it doesn't, and I can't get my finger on it. A terrain altitude restricted surface shader can be warped by a color and vector displacement, but why it won't warp by the altitudes of the terrain itself eludes me.
So here's two more setups to test for you smarties. It is also possible to 'warp' clouds by the altitudes of a terrain, so why not a set altitude.

Staff/Matt we (I) need something like this. Need may be an overstatement, but I guess for circumstances like a sloping/cascading river it would be good to be able to make a sloping waterline as well. Maybe it's simple to make shader/function that works?