Planetside Software Forums

Support => Terragen Support => Topic started by: pixelpusher636 on May 04, 2021, 04:01:16 PM

Title: Masking Stones Shader
Post by: pixelpusher636 on May 04, 2021, 04:01:16 PM
So I've tried masking areas of the stones out in several ways, each creates a new yet unwanted effect.

I've tried masking both the surface layer and individual stone networks with the following methods.

Distant Shader
Elevation
Painted Shader

I've had no success whatsoever. Does anyone have any idea looking at this network what I have hooked up wrong or if I can even mask the pebbled?

Thanks in Advance
Title: Re: Masking Stones Shader
Post by: WAS on May 04, 2021, 04:34:57 PM
Only a colour of 1+ will actually fully mask the stone, anything lower then that in the grays will just be flattening the stone down to nothing at (1+).

I don't know if that makes sense, so naturally here is an example. This is not an example of how to distribute stones, but just the difference between two density masks. Both have the same settings except their contrast, which makes the gradient falloff between low and high colours tighter.

Additionally, to this demonstration, changing the colour offset into the negatives, like -0.25 will give the noise more low colour than high colour, which would create further gaps between noise based on the lead-in scale.
Title: Re: Masking Stones Shader
Post by: pixelpusher636 on May 04, 2021, 05:44:47 PM
Thanks for the quick reply WAS! 
I need to open this and check it out to make sure I'm understanding you right. It sounds like (looking at the file will confirm) that 100% white completely masks while percentages of white only flatten. That wasn't so much of my issue as maybe where to mask. I'll update with examples and additional info. Poor explanation on my part. Thank you as always for examples and help.
Title: Re: Masking Stones Shader
Post by: pixelpusher636 on May 04, 2021, 06:12:46 PM
So the top image is my mask, the second image is fairly normal except I don't want stones and pebbles all the way into the water reflecting so I want to only have them where the white is. The bottom image is what happens after plugging in the mask. Similar happens whichever masking approach I try. I realize the edges probably aren't 100% white but a lot of the rest is. Is this what you were saying WAS?
Title: Re: Masking Stones Shader
Post by: pixelpusher636 on May 04, 2021, 07:55:54 PM
However spaghettilike and unattractive this method is, it seems to have worked. Thanks for the help WAS.

Edit: It looked correct in the preview oddly bu a quick render proved that the stones were indeed still there. So I can't trust the preview in this case.
Title: Re: Masking Stones Shader
Post by: WAS on May 04, 2021, 09:11:50 PM
Since a water plane is relatively flat you can probably just use an altitude restraint. But if you're at small scales you may need a smaller patch size to conform to smaller undulations in the ground displacement (not rocks). Take note to the patch size in this example.

Tighter the altitude fuzzy, tighter mask cut off of the rocks.
Title: Re: Masking Stones Shader
Post by: pixelpusher636 on May 04, 2021, 11:33:46 PM
As always WAS I appreciate your professional advice. I'm off to the sack now but I will confirm your solution tomorrow first thing and report back. 

Thanks again Sir!
Title: Re: Masking Stones Shader
Post by: WAS on May 04, 2021, 11:52:02 PM
Have a good night, and you're welcome.

FYI, when I say patch size, I mean in the Compute Terrain, or Compute Normal shaders.
Title: Re: Masking Stones Shader
Post by: pixelpusher636 on May 05, 2021, 10:49:28 AM
WAS This worked brilliantly! I'd never have figured the patch size in compute terrain and honestly I'm not sure I even knew it was there. Thanks again!!