Photoshop: Create solid image with a transparent shape in it

adobe-photoshopimage editing

My photoshop file contains the following layers:

  1. Shape layer with a custom shape in it colored blue
  2. Shape layer with another custom shape in it colored black
  3. Solid white layer

There is no background layer.

Without rasterizing any layers, I'd like to make the shape in layer 2 create a transparent hole through the white layer 3.

When I export this to an 8-bit PNG, the end result should be a square white image with a blue shape on it and a transparent area where the background of a webpage will show through. No black would show in the image (unless the webpage background contains black).

I can do this by selecting layer 2, cutting that selection out of layer 3, and then hiding layer 2. But I'm hoping to do it in a way that leaves the shape layers 1 & 2 editable and not require extra steps to create the transparency. I want to just continue editing layer 1 and 2 and then export as PNG.

Is this possible? If so, how?

Best Answer

The simplest solution would be to use a mask, but that would require you to remember to make the mask just before you export.

If you want to go this route, select layer 3, and then ctrl for windows/or command for mac click the layer you want to be the basis for the transparency, and then click on the icon down the bottom of the layers panel with the circle in a square. This will give you the transparency you want, but it's entirely manual and you have to remember to update it when you edit the black layer.

You could create an action that selects the layer you want to use and makes a mask from that, but you'd still have to remember to run the action...

Related Question