Planetside Software Forums

General => Terragen Discussion => Topic started by: cyphyr on September 29, 2020, 04:19:29 PM

Title: How can I mask these intersecting terrains
Post by: cyphyr on September 29, 2020, 04:19:29 PM
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
Title: Re: How can I mask these intersecting terrains
Post by: Hetzen on September 29, 2020, 04:23:24 PM
Simple answer. Two planes. One sand, the other rocks. Do what you like then. You may want to mask the sand with the rocks.
Title: Re: How can I mask these intersecting terrains
Post by: cyphyr on September 29, 2020, 04:47:03 PM
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.
Title: Re: How can I mask these intersecting terrains
Post by: WAS on September 29, 2020, 04:59:29 PM
Merge Highest -> Merge Difference (Colour) with Terrain B. Terrain B should be white or black, terrain A the opposite colour.
Title: Re: How can I mask these intersecting terrains
Post by: WAS on September 29, 2020, 05:00:57 PM
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...
Title: Re: How can I mask these intersecting terrains
Post by: WAS on September 29, 2020, 05:22:54 PM
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.
Title: Re: How can I mask these intersecting terrains
Post by: cyphyr on September 29, 2020, 06:09:14 PM
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".
Title: Re: How can I mask these intersecting terrains
Post by: WAS on September 29, 2020, 07:42:57 PM
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.
Title: Re: How can I mask these intersecting terrains
Post by: Dune on September 30, 2020, 02:08:36 AM
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.