Masking Stones Shader

Started by pixelpusher636, May 04, 2021, 04:01:16 pm

Previous topic - Next topic


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
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


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.


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.


May 04, 2021, 06:12:46 pm #3 Last Edit: May 04, 2021, 07:49:40 pm by pixelpusher636
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?


May 04, 2021, 07:55:54 pm #4 Last Edit: May 04, 2021, 08:11:01 pm by pixelpusher636
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.


May 04, 2021, 09:11:50 pm #5 Last Edit: May 04, 2021, 09:33:47 pm by WAS
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.


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!


Have a good night, and you're welcome.

FYI, when I say patch size, I mean in the Compute Terrain, or Compute Normal shaders.


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!!