Fork me on GitHub


Keep that shadow!

September 25, 2005 | Photoshop

If you’ve ever had to do composite work in Photoshop you’ve no doubt ran into having to use a photo of an object that has a shadow on it. I get this frequently – companies will do nice cut outs of their products and put them on white backgrounds but then throw a drop shadow of one kind or another on it that really interferes with using the image in combination with other images. Masking it is easy, but what if you want to keep that shadow? Do you recreate it? Do you try to extract it and use it? Here is a super easy method of making use of an existing drop shadow in an image.

*Updated 2005/09/25 to include how to keep those black background reflections.

Caveat Emptor

This isn’t a magic way to pull a drop shadow off of a complex background – this is a way to to pull shadows from white background images. The technique can be altered to be used with images that have simple colored backgrounds, but for the most part is limited to white or other plain background images. I’ll show one example of using it on an image that has a simple textured background at the end of the article.

Our starting image

imageThis is an image that I recently used this technique on at work. Its a simple product shot of a WatchGuard Firebox X Peak that has a drop shadow and reflection. While neither are real tough to recreate, why recreate that reflection if you don’t have to? A reflection on an image like this is a bit tedious and time consuming.

Let’s get rolling

imageThe next step is to duplicate your layers. After making a copy, we’ll first set our sights on the top layer. On this layer we’ll cut out the image. Depending upon your intended use, you should mask appropriately. For web images you can fudge it a bit and just use the eraser but for print images you really should take the time and properly mask out the image..

imageAfter cutting out the top image, we’ll set the bottom layer’s mode to multiply – the key part to this is that in multiply mode all white areas become 100% translucent to the layer below.

Put a new background under the image and you’re off to the races.

The technique is actually pretty easy but not intuitively obvious.

Variation on a theme

I’ve used variations of this technique with success. This example is of one I put together for a go-karting event.

imageHere is the original image. Its an average photo of a semi-pro go-kart race. Nothing special about it, but it is way too busy for what I want it for. To get a simple, striking header I’ll want to take out everything but the frontmost driver and simplify the background.

imageHere is the go-kart image cut out so that all I have is the driver that I want. At this time I’ve got him and his shadow together. From here I’ll make another layer and do the cutout like in the first example. Since this is only a web background I just hacked away with the eraser.

imageHere is the driver on a simplified background taken from the original image. It does not convey the correct motion for how the driver is pointed but that doesn’t matter once we put text on it. At that point the background will become secondary and barely noticeable.

imageHere is the image with the driver image, with shadow, placed one layer below, set to multiply and lightened slightly. Since I was able to keep the original shadow I didn’t have to try and make something that looked realistic and that matched the lighting in the photo – the original shadow did that perfectly.

Wrapping up

This technique can be used in a lot of different places and can make for some interesting effects if used (or abused) correctly. The only limit is your original image and how good or how tainted that shadow or reflection is.

*Update: on black backgrounds

So, Gozer asked "What about black backgrounds?"

I say, what about black backgrounds?

imageThe modification to keep reflections from black backgrounds (or any colored backgrounds) is actually pretty easy. While not perfect (it lacks some of that highlight luminosity) it does help keep that air of realism that a faked reflection just can’t match. I’m using an image of everybody’s favorite little gadget: an iPod Nano. I’m pretty sure that the reflection in this photo is faked but I’m gonna use it anyway since it was first one I could find and I’m too lazy to go galavanting around teh intarweb in search of a photo to use.

The difference that we’re going to use is that after we isolate the foreground portion, we’re gonna make another duplicate layer and we’re gonna isolate the reflection. Cut out everything that falls within the reflection area and continue down within the area that the object would reflect if the reflection were stronger – we need some area to fade with.

After that, change the new layer to Overlay mode. If the mask for this layer was a vector mask, rasterize it now. Use the gradient tool, blending from black to transparent on the mask to blend the transitions as needed.

Make that highlight right

imageThe next part gets a bit subjective. Since we apply the refelction as an overlay layer we don’t quite get the bright areas that we need to be convincing. For this I duplicated my original layer and lightened it to enhance the reflections. I then used Select: Color Range to get the areas of the reflection that I felt were important to the realism and filled them with white on a new layer.

This new layer was moved to be inbetween the main image (the full strength image we knocked out first) and the reflection layer. I ended up using the layer in normal blending mode at 30% opacity to help pull out the hightlights in the reflection. The results are very acceptable. Depending upon the needs of the image this step should be examined closely and worked on not to match this tutorial but to match the image at hand. It will vary wildly.

Another conclusion

imageSo, while neither one of these techniques will work 100% of the time they form a basis of how to deal with preserving shadows and reflections in images. Sure beats buying a copy of Extensis Mask Pro or Procreate (Corel) Knockout (which I have and find more cumbersome that it is worth).

Who knows, maybe Nanos can levitate over water…

19 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

  • This gets bookmarked in that big ol’ "Design Stuff" bookmarks folder in the sky

    Joey B., September 25, 2005 2:24 am | permalink

  • See, the problem is, how do you nicely cut out the go-kart like that? Cutting out with the Pen Tool is a pain, and Magnetic Lasso tool sucks in those situations.

    Tom, September 25, 2005 10:11 am | permalink

  • I do most of my cutouts with paths. I did the first cutout with the path tool and the separation of shadow and cart just hacked away with the eraser.

    To be effective at masking one had better be very familiar with the Pen Tool. One frustrating point I’ve seen for those getting to know the Pen Tool is that you won’t get it right the first time. I typically have to go back 1 or 2 times to get my path right.

    Shawn, September 25, 2005 11:37 am | permalink

  • Ooh, nice. I’ve been looking for something like this for a while.

    Max, September 25, 2005 11:50 am | permalink

  • noice tip gip.

    gozer, September 25, 2005 6:03 pm | permalink

  • except if your background is black!

    gozer, September 25, 2005 7:02 pm | permalink

  • Gozey, that’s why I put the disclaimer in the 2nd paragraph…

    I’m sure there’s a way to manipulate this for a black background. I’ll have to ponder it a bit.

    Shawn, September 25, 2005 7:23 pm | permalink

  • except if your background is black!

    Mmm… Invert the image and work on it, and invert it again?

    Tom, September 25, 2005 7:30 pm | permalink

  • I don’t know – mainly because on a black background you won’t have a shadow to deal with, and any reflections will most likely be a much different animal than those on white backgrounds.

    If a shadow is desired after plucking off a black background then you’ll most likely have to fake one.

    Shawn, September 25, 2005 7:36 pm | permalink

  • Ohh… Shadows! I was thinking of an reflection. But how can you have a shadow on a black background? I suppose there can be one on a grey background, but on a black background?..

    Tom, September 25, 2005 9:44 pm | permalink

  • well…reflections are what i want.

    gozer, September 25, 2005 10:00 pm | permalink

  • Gozey,

    You have a sample image? That’s an interesting challenge.

    shawn, September 25, 2005 11:11 pm | permalink

  • Actually, I’ve got it worked out and am adding to the article.

    Shawn, September 25, 2005 11:42 pm | permalink

  • heh….actually what i wanted was this:

    Linkie Poo

    but on a black background with reflections. but it’s been a killer article gip. definately got a new trick 🙂

    gozer, September 26, 2005 12:23 am | permalink

  • Oh, you wanted to take that white background with reflections and make it black…

    Hm, lemme think about that.

    shawn, September 26, 2005 12:34 am | permalink

  • I think I have it, but I need to do some tweaking…

    Shawn, September 26, 2005 12:51 am | permalink

  • Don’t let your brain explode, there, Shawn.

    Joey B., September 26, 2005 2:39 am | permalink

  • To Tom’s question about cutting out the gokart, you could also use the Magic Eraser Tool (what it’s called in PS7, don’t know about where else), though sometimes not very good, it’s quick if it decides to work as you like.

    Joey B., September 26, 2005 5:29 am | permalink

  • gippy brings the pawn to the chessboard

    Tobias Butler, October 1, 2005 8:48 am | permalink

Comments are closed