alhpa minus alpha?

K, i’m working with nodes here. Got a fairly simple problem, and I don’t know how to solve it. I’ll try to explain it the best I can.

Basically, I have two different alpha images. Everywhere that both images have a positive value, I need to output as negative. Make sense?

I’ve tried a few things, but nothing comes out right :frowning:

Screenshot your nodes setup ?

Use a mix node and set the value to 1.0 then set the type to difference. Use another mix node to add the two alphas together and a final mix node to subtract the difference node from the add node (I’m not in front of Blender right now but this difference may need to be inverted). You may need to make some contrast adjustments after the difference node if there are transparent areas in the two layers and you just need to cut a hole clean through. You can use either a Color Ramp node or RGB Curves node for that. Just be careful with contrast adjustments to alphas because it’s easy to chew up antialiased edges via adjustments.

Technically, there is no such thing as negative alpha. The lowest Alpha can go is 0 (fully trnasparent). So, both images always have positive alpha.

But, you can use a map value node to pass on or filter out values below min and above max, like a band-pass filter. For the values that are passed thru, you can scale them using a Colorramp node with a very narrow range set with the upper slider very down low, so that very little values input are output as 1.0 (white). Then compare that to the original using a multiply mix node, and wherever the band-pass map value output is 0, those values (color, Z or A) will be set to 0. Wherever the passed values are 1, the image is preserved.

You can also set the offset to your threshold, like -.5, and your factor to -1, and the MIN button on to 0. You can then add .5 using a math node. Then anything that come in will have .5 subtracted from it, turning negative. the factor of -1 will flip that to positive .5, and the MIN will pass it thru. Anything that WAS above .5 will be positive then flipped negative and thus filtered out. See the wiki on the Map Value node for more info.

thankyou all, very helpful