Hi, I need some help with some simple material math’s that I’m struggling to visualize before me.
I wish to merge two opacity masks, one is a simple 0 to 100% gradient, another is a textured mask.
My goal is to basically subtract the darks from the gradient to the mask, and add the lights, so that the mask blends in along the gradient, cutting off completely in one end and becoming 100% solid in the other, while retaining the texture in between. Like how landscape treats height masks while painting with a gradient brush.
Multiplying them together gets me halfway there, so that everything gradually goes white, but it does not remove the darker areas from the textured mask, so the white of the mask is still fully visible at the black end of the gradient. What else should I do?
Turns out the blend nodes support automatically converting the 1 channel inputs into vector 3, I then broke the 3 vector back into individual channel and used one of them.
This works for now, but I’m pretty sure I’m wasting a bit of processing here.
It didn’t cross my mind I could use the mask as the alpha instead of one of the targets! Since my goal was to have a combination of the masks, my mind was set on them being the targets.
This is the kind of stuff that I love about just asking around for a second set of eyes on something, it’s so easy to miss things that should be obvious.
I would have gone with subtracting the 1-x fof the shade from the pattern before adding the regular version.
I’m not sure if the performance is better or worse then a lerp, but the result should be equally accurate.
To be perfectly honest, I couldn’t quite get the add methods to give me quite the results I was looking for, either being too sharp or not removing enough in one place, or too much in another and ended up using a blend soft light node and breaking out and using only one of the channels for the exact look and control I was going for instead.