How can I mask these intersecting terrains

Started by cyphyr, September 29, 2020, 04:19:29 PM

Previous topic - Next topic

cyphyr

I have two terrains, one mountainous and craggy and the other gentle rolling dunes.
The mountainous is intersecting with the rolling dunes using a soft maximum shader.
However I can not figure out how to extract a mask from the intersection.
I would like to get the dunes one colour and the crags another.
Any ideas?

intersecting terrains.tgd

Intersecting Terrains.JPG
www.richardfraservfx.com
https://www.facebook.com/RichardFraserVFX/
/|\

Ryzen 9 5950X OC@4Ghz, 64Gb (TG4 benchmark 4:13)

Hetzen

Simple answer. Two planes. One sand, the other rocks. Do what you like then. You may want to mask the sand with the rocks.

cyphyr

That will work if the blend between the two was sharp but by using the soft max shader (set to 100 in this case) the demarcation between dunes and crags rises and falls. It's not a constant. 
Two planes give a sharp demarcation and I could use a merge shader (Highest raise)  just as well.
www.richardfraservfx.com
https://www.facebook.com/RichardFraserVFX/
/|\

Ryzen 9 5950X OC@4Ghz, 64Gb (TG4 benchmark 4:13)

WAS

Merge Highest -> Merge Difference (Colour) with Terrain B. Terrain B should be white or black, terrain A the opposite colour.

WAS

#4
Here is an example. Issue with both two planes, and this, is breakup of the intersection zone.

Difference Colour/Scalar function may be more straight forward for the mask.

Let me look at your file...

WAS

It doesn't quite work with your setup due to them being scalars and sharing similar "height" zones of contrast. Maybe you can work from this though.

cyphyr

Thanks I shall investigate further.
I would have thought it simple but it eludes me.
I'm not quite sure what you mean by them "sharing similar "height" zones of contrast".
www.richardfraservfx.com
https://www.facebook.com/RichardFraserVFX/
/|\

Ryzen 9 5950X OC@4Ghz, 64Gb (TG4 benchmark 4:13)

WAS

Quote from: cyphyr on September 29, 2020, 06:09:14 PMI'm not quite sure what you mean by them "sharing similar "height" zones of contrast".

Y data of similar "whiteness" which makes it hard to separate with colour adjusting through the fuzzy zone you've provided of 100. As it's a mix of both Main Input and Input 2.

Dune

I have to look at your setup on another machine, but I'd probably set this up differently, by starting with a color based soft terrain and then masking in areas for the rocky parts. So you start with (Y based) masks, then do the displacements.