What function to combine masks?

Started by gregsandor, October 16, 2008, 06:02:37 AM

Previous topic - Next topic

gregsandor

I have two terrains and a set of masks for each.  The 2565m terrain is located in the middle of the 23040m terrain.  I want to apply both masks together; what function do I use?  Add?  Multiply? Divide?

rcallicotte

I don't know.  Haven't tried it.  Have you experimented?
So this is Disney World.  Can we live here?

cyphyr

Checkout Big Bens Tutorials and Work in Progress postings. He's been doing exactly this but with elevation data, should be the same technique though:)
richard
www.richardfraservfx.com
https://www.facebook.com/RichardFraserVFX/
/|\

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


bigben

#4
1: Uncheck Flatten first in the Displacement section of the terrain node.
2: Plan your masks....  the sum of all masks at every point must = 1. Sounds obvious, but when you get errors, this is the first thing to check, especially with function-based masks.

For 2 terrains this is easy.
a) Use the mask for the smaller terrain as its blending shader.
b) Apply the same mask to the larger terrain but invert it.

For 3 terrains

repeat step a) above
Then subtract the mask for the smaller terrain from the mask for the larger terrain (subtract scalar node) and use this as the blending shader for the larger terrain
Then apply the same mask of the second largest terrain to the 3rd terrain and invert it.

The pattern scales for as many terrains as you want, with the largest terrain using an inverted mask from the second largest terrain.

gregsandor

Thanks bigben, that's exactly what I was looking for. 
y the way, have you modeled Glencoe or Glenfinnan?

bigben

Glencoe would be on my Ben Nevis terrain but 90m resolution sucks.  I'm trialling a few different methods of adding detail, starting with 10m data.... but without the real data it's going to be a big compromise for SRTM3 data. I've done a short walk up Glencoe (after driving through on a sunny day a few days before... stupid!!!) so at least I have a feel for how it should look.  I'll probably start with the Grampians here in Australia for adding detail to SRTM3 TERs though as I'm much more familiar with the terrain.