Adding a displacement map
Video: Adding a displacement mapIn this image, I've distorted a picture of an American flag to fit on the photographed white flag beneath. But because of the limitations of Image Warp, we can only go so far with this method. Let's now see how we can make the whole image much more convincing. And we are going to do that through the use of a Displacement Map. First of all, we'll hide our flag. Select All, and make a merged copy.
Viewers: in countries Watching now:
Most Adobe Photoshop artists don't make use of Smart Objects, and thus miss out on a potentially very powerful tool. With Smart Objects you can create a complex transformation once and then swap out the contents for any artwork you choose. In this workshop, Photoshop artist and author Steve Caplin shows you how you can use Smart Objects to enhance almost all your Photoshop work. Learn to simplify and speed up repetitive tasks, and create templates that can be repurposed as many times as you wish.
- Editing Smart Objects
- Working with multiple layers
- Using Smart Filters
- Replacing contents
- Using multiple Smart Objects
- Creating flexible cover shots
- Complex distortion
- Working with Camera Raw
- Working with movies and Illustrator files
Adding a displacement map
In this image, I've distorted a picture of an American flag to fit on the photographed white flag beneath. But because of the limitations of Image Warp, we can only go so far with this method. Let's now see how we can make the whole image much more convincing. And we are going to do that through the use of a Displacement Map. First of all, we'll hide our flag. Select All, and make a merged copy.
And what this will do is copy the entire document to the clipboard as if it were a single layer. When we now paste, we can see this single layer that represents the entire documents as it was at that stage. Displacement Maps work only with black and white information, not with color. So that's not all the color out of this. We can do this with Image > Adjustments > Desaturate.
And I'm going to save this document, I will use Save As, to save it as a Displacement Map, and I'll call it Displace. Now, when we return to our Smart Object, let's hide that Displacement Map. We can apply a Smart Filter to it. We can go to Filter > Distort > Displace.
And Displace is one of those curious filters that you may have looked at, you may not. And if you have, the first thing you'll be faced with is this dialog, which makes little sense. All we want to know is keep the horizontal scale and vertical scale to 10 for now. We want to stretch the Displacement Map so it fits our image exactly. In fact, it's the same size so that's irrelevant, and we want to wrap around the edge pixels. So, let's just try it and see what happens.
Well, the first thing it's going to say is, Choose a Displacement Map. We can use that file we just created and open it. And we can see how, what's happened is the image has been wrapped around the flag. And let's zoom in on this a bit. But it's been wrapped around it much too accurately. Because the flag underneath had a fine texture, you can see it's rippling over that fine texture exactly, and that's not what we want.
We want it to follow the gross distortion of the flag, we don't want it to ripple over every tiny little bump in the fabric underneath. So, let's undo that. We'll go back to the image we're using as a Displacement Map, and we need to soften it. and the best way to do that is to blur it. So, I'd use Filter > Blur > Gaussian Blur. And let's blur this by, enough so that we still see the basic shading, but we can no longer see any of the fine texture. And in this case, a couple of pixels should do it. Let's also make this stronger.
And the simplest adjustment to do this is going to be Brightness and Contrast. We can just increase the Contrast to make the difference between the light and the dark that much stronger. Now, you've noticed that we've already saved this document as a Displacement Map, all we have to do is save it again. And it will override the existing one. When we save it, the current state of the document is looking just like this. That top layer is always visible.
If we hide that and go back to our flag, we can now choose Filter > Distort > Displace once more. We'll use the same settings we had before and click OK. Once again, it's going to prompt us to choose our displacement map. And there it is. And let's open that. Now, we can see how well these ripples work on our flag. They're going over the base of the flag here they're going over the folds and wrinkles towards the edge.
And certainly, it's working rather well in this deep fold here, you can see how the flag beneath appears to roll over the top of these. Where it's not working so well is in this area. You can see there's a kink here that shouldn't perhaps be there, and something rather odd is going on with these stars. Well, we can fix that by tinkering with our Displacement Map again. Remember, the areas are the stars at the top and this fold. So, let's have a look at our Displacement Map itself and we can see where the problem's coming from.
Let's go to our Brush, we can load a mid gray, or in fact, pick up a color from underneath, and just paint it light through there. Sample a color, and paint it lightly through here. And that should have both those areas taken care of. Now, we need to do a little bit more underneath this fold. Remember that position, and we just paint over this. And save once more. Now, when we go back to our flag, let's remove that original displacement and add it again.
Again, it asks us to locate our Displacement Map. We can select it, and that problem is now fixed. We've still got the ripples here where we want them. Much less distortion in the stars at the top, and we haven't got that ugly distortion on here. The flag doesn't quite reach to the end. But that is easy to fix. We can simply adjust our transformation. Once we go to Edit > Free Transform, we're going to get the standard warning that the smart filters will be turned off.
That's OK. And we can now switch into Image Warp, and pull our flag out very slightly, just so that it covers the area that was missing before. When we apply it, our Displacement Map is automatically reapplied, and there's our rippling flag. Displacement Maps are a powerful, but little used weapon in the Photoshop arsenal. The ability to use them, to create automatic distortions for us, is a great benefit. And the ability to use them with Smart Objects is simply fantastic.
There are currently no FAQs about Photoshop CS5 Smart Objects Workshop.