Height mask problem

Hi all. Help needed. :slight_smile:

A bad side effect of terrains is that they often look as if they were “cut out” of a much wider landscape, the edges look sharp and unnatural:

The idea is to fade out the edges by a height mask (.BMP image or .TER file). White = 100% height, black = 0% which multiplies the existing terrain:

Unfortunately, I haven’t found a solution (including WM 1.0) to use the mask image as a multiplier from 0% to 100%, I tried multiply, subtract and many other things. Probably I am doing something wrong. An approved solution and exact step-by-step guide would be appreciated, not any assumptions. :wink:

Thanks,

Karsten

Hi Karsten,

hmm, using a mask like that should indeed work. Either an import one or a “homegrown” one inside of WM.

For example, create a radial gradient device, and a combiner device.

Hook your terrain into one input of the combiner, the rad grad in the other, and set the mode to multiply.

This should give you a terrain that only exists in the central area of the heightfield, and fades to nothing as you go farther away.

If you want more control over the area that is masked, you could use a “Bias/Gain” device between the rad grad and the combiner that would let you tweak the mask.

What results are you seeing?

Karsten, I downloaded the provided mask, converted to .bmp, and used a File Input to load it and feed it directly into a combiner set to Multiply, with the other input as a regular Perlin Generator. It seems to work fine. Can you give us more information about the network or specific devices and connections you were trying to use to achieve your effect?

  • Oshyan

Hi Stephen, Oshyan,

Thanks for your help. Indeed, the problem was the full scaling. Now I have two methods which both function:

File input
After the file input there must be placed a Clamp node, choose Expand and Find Extents – only by this there is kept the correct scaling from 0 to 100 percent. Put the Clamp and the terrain into a combiner and choose multiply, that’s it.

Radial Grad
Radial Grad > Type Square > Radius 0.9 > activate Normalize. Blur > Gaussian > Blur Radius 30. Put the Blur node and the terrain into the Combiner, again multiply as above.

The “Radial Grad method” looks better for me, it is size independant, more flexible and offers better accuracy.

Regards,

Karsten

Glad you got it sorted out. I would think Normalize on the clamp would do the work of “finding the extents” for you though - just food for thought.

  • Oshyan

Ah ok, I just tried it… and it’s better in theory (by internal accuracy). :slight_smile: