Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question

2 Answers 2

up vote 0 down vote accepted

To solve this, I did the following:

  1. Moved my white layer above the black shape layer
  2. Selected the vector mask thumbnail in my black layer
  3. Selected the Rectangle tool button
  4. Selected the "Exclude Overlapping Shape Areas" button in the toolbar
  5. Drew a square over the entire image in my black layer
  6. Right clicked on the white layer and selected "Create Clipping Mask"

This seems to have done the trick. Now my black layer is an INVERSE of my shape, but I still have the shapes in it and can edit them as desired. It cuts a transparent hole out of the white layer where my shape was at. Over the top of this is my blue layer.

share|improve this 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...

share|improve this answer
    
Thanks for the suggestion. I think I solved it however, take a look at my answer. –  Tauren Sep 23 '10 at 4:28

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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