Skip to main content

Displacement Map

Lesson 4 from: Warp, Blend, Liquify in Adobe Photoshop

Ben Willmore

buy this class


Sale Ends Soon!

starting under


Unlock this classplus 2200+ more >

Lesson Info

4. Displacement Map

Next Lesson: Polar Coordinates

Lesson Info

Displacement Map

Then, there's another way of bending things. And this is where we can bend things, based on the brightness of a picture. If you look at the brightness of a three-dimensional object, often times it gives you clues as to it's dimensionality, just from the shadows and the highlights. If you look at this particular photograph, and you look at one side of my face, you'll notice that the areas that are furthest away on the side of my face are darker, and as my face gets closer and closer to camera, it's getting brighter and brighter, and the very tip of my nose is the brightest. On the other side of the face, it's a little different. In that it's getting brighter as you further away, that's cause there's a light source over on that side. But still, you see this thing where it might be getting darker, as it gets closer to camera, because it's getting further away from the light source. Well, there's a way to use the brightness of your picture as what you might call a depth map. Something that...

just defines a three-dimensional character of a two-dimensional photograph. And if you want to use that to bend something, then we can do so using something called a displacement map. So, let me give you a brief idea of how to think about displacement maps. We can use that flag image, because there you can tell if it's been bent. So I'm going to grab the flag image, I'll use my move tool, and I'll click within the flag image, I'll drag up to the other tab, then drag down into this document. So we put it in here, and close the original flag. Zoom out, and I probably wanna scale the flag down, but before I scale it down I think I'm gonna turn it into a smart object. Therefore, everything will be calculated on the original sized flag. I'll type command-t, that's free transform, control-t and windows. And I'm gonna scale this down. I'm gonna bend that flag around my face, might get some stars and things in there. But I'm going to do it based on the brightness of my face. So, first I'm going to start off with the base image that's here, and what I need to do is simplify it. To simplify, just so I don't mess up the original, I'll duplicate this layer. It's not that essential that you duplicate the layer, what you could do, in fact, is just duplicate the document. That'd be easier. So, image duplicate will give you a brand new file, so you don't mess up the original. You know, I'm going to call this 'the map'. And then I'll throw away the flag, cause this is a duplicate document, and I just want to simplify what's here. The first thing I'm going to do to simplify things is take all the color out. In image adjustments, desaturate should do that for me. The next thing I wanna do is get rid of the really fine detail. If you look at the fine detail, what's going to happen is, areas that are bright are going to be thought of as being close to you, and areas that are dark are going to be thought of being further away. And what that means is, where the pores are in my face, it's going to think that they're literal little drill holes, that they're lower than the rest of my face. And I don't want it to distort the flag with that much detail. I want it to think about the overall shape of my face, not every little whisker and pore. So, what I'm going to do next is blur the image using a filter called gaussian blur. And I'm just gonna blur it enough that the fine detail goes away, like the pores on my face, and that I just see the overall brightness of the image, the overall tonality and shading. Probably somewhere right around there. All the really fine details; whiskers, pores, all that go away. Then, I'm going to save this on my hard drive. I'll just choose save as, going to put it right on my desktop, then I can use Photoshop file format. Now we can close that file. Now, I'm going to work on the layer that's on top. That's the one that has the flag in it. Turn it's little eyeball back on. And I want to bend the flag, based on that simplified document that's saved on my hard drive. So, to accomplish that, I'm going to choose filter, distort, displace. This comes up. And it wants me to type in a number, that number tells you how mountainous the end result will be. If you type in a low number, imagine you're seeing a three-dimensional object from the side, you'll get a very slight raise to the image. If you type in a high number, you're going to see a very tall raise to the image. And you don't really know what number to use, because it's really based on how high resolution your picture is, and how much contrast is in that file we're gonna feed it. How close to white is the bright area, how close to black is the dark, and so really I'm just gonna guess here, and if I don't like my end results, I'll just choose undo and I'll try again. Typing in either higher or lower number. I always type in the same number for horizontal and vertical, and then we have some options down here, and this really is saying what should it do if the image we saved on our hard drive was a different size than this document. It needs to be the same size, and so to make it the same size, if it was smaller should it stretch it to fit, or should it tile it, repeat it? Well, that's not going to matter, because it's exactly the same size as this document. And then what should it do with the undefined areas, should it wrap around the other side, or repeat the edge pixels? We're not going to need to worry about that. All I'm going to do is click okay, and when I do it's gonna ask me for a file. It's a file that it's just going to look at the brightness of, and it's going to think of bright things as being close to you, and dark things as being far away. We want to click open, and then it should bend our flag. There it is. So, if you look at where the edge of my chin would be, and not my, what do you call this part? My jawline. I can see it's been bent. I can also see it's been bent on the other side, there's some vertical line there, and if I were to hide this I could tell what it is. But, what I'm gonna do now just to make it easier to tell how that is conforming to my face, is I'm going to print it on my face like a tattoo. And I can do that by changing the menu, at the top of the layers panel, known as the blending mode menu, I'm going to choose a choice called multiply. And when I do, now you might be able to see that where my eye is, you can see it's bending down into my eye socket, and right here where my skin bulges out to have my cheek, you can see it bending, to conform with that. The only other thing I might want to do, then, is mask it. So, that it only applies to where my face is, and doesn't go beyond. And I might want to mask it so it doesn't print on my eyeball, otherwise it wouldn't quite be an accurate tattoo. Now, what I could do, though, is choose undo, with command-z, and let's say I wanted to bend more. I was using the number of twenty. I'm going to type command-z one more time, so it's no longer applied. Or, since I used a smart object, I don't even need to do that. Right here it says displace, just double click on that, and you'd be able to change it. When you double click, it'll ask you for the settings, I was using twenty, let's try forty. Each time you click okay, though, it's gonna ask you for that other file, so make sure you don't throw it away until you're sure that you like the settings. But, now we have more of an extremer, mountainous bend, and if I set it to multiply it might be more appropriate. It all depends on the image. But, what, this is how you could grab a tube of toothpaste, that had no label on it whatsoever, you could put a new label on top of it, and do a displacement mount, because the highlights and shadows that would define the, kind of wrinkly character of a tube of toothpaste could be used to bend the label to make it look like it fits. Or, you have a t-shirt, and the t-shirt has wrinkles in it, you want to show a design on the t-shirt, that conforms to those wrinkles, a displacement map is how you do it. Or, you have the door of a car, and you need to put a police logo, you know, for a police car design on it. Well, if it has any shading to that door of the car, it's usually going to give it some sense for the dimension, and using that to bend a logo that would be printed on the door, would usually make it look appropriate. Then you use multiply mode to actually make it look like it's printed on it, and then you can mask it to make sure, here if I add a layer map, that it maybe, in this case, what I'll do is use the quick selection tool to try and select my sky. I got a little bit of my hat in there, don't want to take away my hat. And then maybe I select inverse, to get the opposite, oh, and actually, I don't need inverse, there's already a mask here. All right, I'm going to fill that part of my mask with black, to get it off the background. And I'm going to come up here to paint with black, just grab my paint brush, gotta paint it black, to get it off my eyeball. [Ben Chuckles] And get it off my hat. So, there's all sorts of uses for that, anytime you see those t-shirts that have designs that have never been printed on a t-shirt before, but they're previewing it, they're using displacement maps to do so. The key is, you have a blurry black and white photograph saved on your hard drive, that you feed the displace filter.

Class Materials

Bonus Materials with Purchase

Practice Images

Ratings and Reviews

a Creativelive Student

Very good course ! Topics were well explained. Ben is a good teacher.

Colleen Bittner

very succint clear instructions-easy to follow along

Student Work