How to knock out same-color overlap in Photoshop

Let’s say I have two layers with some black pixels on them:

enter image description here

What can I do with blending, masks, knockouts, etc, such that when these two black things overlap, they reveal the color underneath, like this?:

enter image description here

I accomplished the above with a jury-rigged technique of manually creating a white duplicate of one of the shapes and using a layer mask to reveal it in the right spot. What I’d like is a more streamlined way that doesn’t need an additional pixel layer, and can keep the knockout effect as the two shapes are repositioned.

Answer

This is a bit convoluted and won’t easily translate to more complex artwork (i.e. anything other than solid black/white blocks of color), but it’s the only way I can think to do this with pixel layers and have the effect “live” and update with any changes to the layers…

You can use the “Difference” blending mode on the top layer, which subtracts the color values of one layer from the other. The only problem being that blending with black produces no change; blending white with white however produces black…

If you can change the rectangles to white, set the top layer to “Difference” and invert the result (with an “Invert” adjustment layer), you can get close to the result you want:

enter image description here

Then if you want the background color to show through you can group the two rectangles, clip the invert adjustment layer to the group so that it doesn’t affect the background, then set the group’s blend mode to “Multiply”:

enter image description here

If you can’t change the black pixel layers to actually be white, you can just add a white color overlay to each of the black layers:

enter image description here

Attribution
Source : Link , Question Author : bubbleking , Answer Author : Cai

Leave a Comment