6

Is there a way to take two layers of the same size and make the bottom layer transparent everywhere where the top layer isn't transparent? Basically, I want to cut a hole into the bottom layer that has the same shape as the top one. The layers are pixel-based if that makes a difference.

  • 1
    Why not use a mask? – Alin Sep 19 '16 at 12:04
  • I feel that I must have misunderstood this. If you have 2 shapes that are exactly the same and you use one of them to cut the other one, wouldn't you be left with an empty document? – Joonas Sep 19 '16 at 12:08
  • @Joonas I think they are the same external size but not the same shape. – Alin Sep 19 '16 at 12:09
  • Right. That makes sense. – Joonas Sep 19 '16 at 12:14
  • 1
    Does this answer your question? – Cai Sep 19 '16 at 12:16
9

You can easily achieve this by using a mask on the second layer that is the same shape as the first layer like so:

  • Ctrl + Click on the first layer to select it's contents
  • Click on the second layer then click the bottom Add layer mask button
  • Click on the mask and hit Ctrl+i

The way these masks work is that it hides the parts of the layer that you don't want without damaging the layer.

Black = hidden

White = visible

PS: Ctrl+click on the mask shows only the contents of the mask (like I did in the example below when you can only see the light bulb in b&w). Ctrl+click again to come back to normal.

PS: PS: You can disable the mask without deleting it by Shift+clicking on it. Do the same to enable it again

enter image description here

Joonas's note in the comments:

Incase someone who is working with Shape layers finds this, it should be mentioned that this isn't the way you'd actually want to do it. If you have Shape layers, merge both layers and use Path operations or a Vector mask.

  • Incase someone who is working with Shape layers finds this, it should be mentioned that this isn't the way you'd actually want to do it. If you have Shape layers, merge both layers and use Path operations or a Vector mask. – Joonas Sep 19 '16 at 12:16
  • @Joonas Well yeah :)) I just found it faster to create the example. – Alin Sep 19 '16 at 12:19
  • 1
    @Joonas Added it as a note in the answer. Thanks :) – Alin Sep 19 '16 at 12:21
  • 1
    @Guest65i7 You just invert the mask, Ctrl+i inverts the mask. And making it the same size, press Ctrl+T (transform) on your first layer, check out the W (width) and H (height), note those down and then press Ctrl+T On the second layer and type the values of the first layer to make it the exact size. – Alin Sep 19 '16 at 15:25
  • 1
    If more answers could be animated gifs the world would be complete. – DᴀʀᴛʜVᴀᴅᴇʀ Oct 2 '16 at 3:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.