Fade Layer With Shadow

Layer With Shadow
Figure 1 Layer With Shadow

Sometimes you want to fade the image behind which you’ve placed a layer that you are using for a border/outline or a shadow. The problem: as the layer fades away, the border/outline/shadow layer is visible through it, even though the border/outline/shadow layer too is being faded away at the same rate. The solution then? Remove that portion of the border/frame/shadow that is immediately behind the image itself. You do that using the technique used to create the Simple Frame (see Layers paragraph 4 on page 18. Basically, use a copy of the image layer (or a same sized layer) as an inverted mask. This mask is then punches a “hole” through the border/frame/shadow layer, leaving just the offset portion behind.

Shadow Layer Beneath Mask
Figure 2 Shadow Layer Beneath Mask

Assuming the border/outline/shadow layer is a solid/gradient layer, the simplest approach is to duplicate the image layer (or make add a layer that has the exact same aspect, zoom, and position). Position it as the new layer immediately above the border/outline/shadow layer. Now, make the duplicated layer an inverted transparency mask. Anything immediately below the mask layer is concealed and anything offset from the mask layer becomes visible, is revealed.

So, assuming the shadow layer is in the same position as the image but offset to the right and down a little from it, that offset part is the only visible portion of the border/outline/shadow layer. Turning the image layer off will verify this for you.

Shadow Cut by Inverted Mask
Figure 3 Shadow Cut by Inverted Mask

So, during an image fade, the border/outline/shadow layer’s offset portion fades at the same rate as the image layer. The portion of the border/outline/shadow layer that is directly beneath the image layer does not show. Therefore, it looks like a normal fading image.

© Copyright 20140525-1810 Dale Fenimore, All Rights Reserved


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: