3

I'm trying to reproduce the shadow in the image below, the two grey bars under the actual image.

I have tried using drop shadows but looks like it can't have a negative size value. Any workarounds? I'm looking for something that adapts to the width of the layer/image.

Thanks in advance.

Example:

Example

1

My initial reaction was that it’s not possible. But, if you get really creative, it might be.

Here’s an incomplete attempt, using strokes.

enter image description here

enter image description here

I’m using two strokes, and the strokes are filled with a gradient. It’s pretty inelegant, and also replicates the shadow at the top.

Using a drop shadow and contour also gets part of the way, but it has rounded corners.

If you allow two layers (one for the image, and another identical copy that’s offset for the shadow), I think it would be possible with inner shadow or inner strokes.

  • Thank you, sadly the gradients make the edges a little blurry. I tried another way using Smart Objects but I the size of the "shadow" wasn't consistent when changing the content of the object. – Aníbal Oct 28 '17 at 6:15
  • You can probably avoid the blurriness by setting the opacity handles for the gradient to the same value, and not 1% apart. The UI is quite a bit notchy, sometimes it switches the sides. Working from left to right helps. Or using the Reverse checkbox. But keep in mind the width of the effect is percentual, not at a fixed distance from the corners. – AAGD Oct 28 '17 at 10:23
1

enter image description here
enter image description here
enter image description here


This is technically possible, but the result is not at all ideal. I've recreated the look of your example image using a layer style that utilizes 6 different "shadow" effects stacked as follows:

6) White shadow layer. Size 0, Color White, Opacity 100%, Blend Mode Normal.
Shifted down and far off to the left, covering just the edge of the gray in style layer 4.

5) White shadow layer. Size 0, Color White, Opacity 100%, Blend Mode Normal.
Shifted down and far off to the right, covering just the edge of the gray in style layer 4.

4) Grey shadow layer. Size 0, Color Medium Grey, Opacity 100%, Belnd Mode Normal
Shifted down half way between object layer and style layer 1

3) White shadow layer. Size 0, Color White, Opacity 100%, Blend Mode Normal.
Shifted down and far off to the left, covering just the edge of the gray in style layer 1.

2) White shadow layer. Size 0, Color White, Opacity 100%, Blend Mode Normal.
Shifted down and far off to the right, covering just the edge of the gray in style layer 1.

1) The back-most light grey layer. Size 0, shited down.

In the third image, you can see how the white "shadows" are really just opaque white blocks, obscuring the edges of the grey shadow layers. This solution admittedly has enough problems that I hesitate to call it a solution at all. It will only be practical if your main objects are all the same pixel width and only so long as the shadow doesn't need to be transparent. The height can change, but that's about it. At any rate, I hope this helps.

  • I realized as I was posting this that the same effect could be achieved with only 4 shadow effects. It's note much better, but it's easier to tweak. – 13ruce Nov 28 '17 at 22:01
1

I made a workaround using linked layers.

Make two rectangle shapes below the Image Layer (I prefer using vector Layers for better scaling).

Select that three layers and go to menu: Layer >> Link Layers.

Now we can scale any of the three Layers that the linked layers will scale too.

See the image below:

enter image description here

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.