displacement weirdness

Started by Nala1977, May 22, 2021, 12:51:38 PM

Previous topic - Next topic

Nala1977

maybe im doing wrong, as usual but.. i created two simple shapes and shifted one a bit on the right side so they intersect, then i used merge to subtract one from the other so i could create a half moon shape, and then displace it

problem is the terrain is displacing upwards whre i want, but displacing downwards where i do not want. I dont understand how Terragen interprets the colors. Black should be No displacement, while white should be displacement.

So why in the black part (inside the halfmoon) the terrain is pushed downward?

WAS

I think you want to simply mask the first by the second.. subtraction is going to subtract into negative values. Which is still legal displacement.

WAS

Here is an example.

Nala1977

thanks WAS, so you telling me there is no way to have the same result using a merge shader node?

WAS

I don't believe so. What you want is a masked result and the merge shader is blending. There is no mask mode, though maybe that would solve the needing to use a heavy Surface Shader just to mask. Lots of variables being reference that aren't doing a thing. Waste of resources imo. Despite how little. It all adds up.

Still want just a Mask Shader.

KlausK

Something like this, perhaps?

CHeers, Klaus
/ ASUS WS Mainboard / Dual XEON E5-2640v3 / 64GB RAM / NVIDIA GeForce GTX 1070 TI / Win7 Ultimate . . . still (||-:-||)

WAS

Oh cool. Why does that even work though? The setup of mix to A at 1 with subtraction, with an absolute colour as mixer makes no sense to me.

KlausK

The "Mix to A" setting has no influence on the result here. Can be 0, 1 or any other value.
Only the subtraction is important. I cannot explain how and why it works really.
The idea was that the "Absolut Colour" clamps the blacks from going into negative values.
I use this always together with simple shapes.
Also, using a "Absolute Scalar" instead does the same.

CHeers, Klaus
/ ASUS WS Mainboard / Dual XEON E5-2640v3 / 64GB RAM / NVIDIA GeForce GTX 1070 TI / Win7 Ultimate . . . still (||-:-||)

WAS

#8
Ahh that makes sense now. If mixer doesn't allow negatives then yeah. Probably only a clamp 0 scalar is needed in that case, to not possibly interfere with peaks.

Dune

I would simply do it like this, cheaper too.

Nala1977

thanks everyone, lots of possibilities, whish this was a little bit more straightforward with a dedicated mask node with all operations like Was said, its a bit weird what you gotta do to achieve this simple thing :)

Dune

I thought it was pretty simple and straightforward ;)