How to create a transparent stroke or outline around a vector shape?


Question

I'm attempting to create a transparent stroke around the inner heart shape, which knocks out the "lungs" layer below to reveal the red bottom layer.

I seemed unable to create this as an actual stroke (which, in any case, would only reveal the "lung" shapes below it, not the red bottom layer), and my next attempt was to duplicate the heart, enlarge it and use it as a mask, but that also didn't help, as it's not an even outline of the heart.

Any ideas of the best way to do this? Thanks in advance.

--

1
1
5/20/2013 5:49:00 PM

Accepted Answer

The best method I found to do this is as follows:

  1. Create a stroke (any colour) of the appropriate size for the shape for which you wish to make the stroke transparent (although it will look like this, this will not be exactly what you are doing to achieve it.)

  2. Separate this stroke on to its own layer by right-clicking the shape's layer styles and selecting "Create Layers." Ignore the others for now.

  3. Now it's on its own layer, Cmd-click the stroke's shape in the layers panel, which will select the shape.

  4. Invert your selection, by holding Shift + Cmd + I, or Select > Inverse at the top.

  5. Select the layer below, which you will be masking with the separated stroke layer effect.

  6. Select "Add layer mask" from the bottom of the layers panel.

  7. Erase the stroke effect layer.

  8. To clean things up, if desired, merge this bottom layer with the top layer and all of the separated layer effects to create one layer.

enter image description here

3
5/22/2013 3:00:00 PM

Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow


Website under construction!!!
^