Photoshop Displacement Mapping

August 4th, 2009 Posted in Tutorials

Photoshop Displacement Mapping

In this reencoded photoshop tutotrial, I will explain how to use Photoshop’s Displace filter and Displacement Maps.  As always, in addition to the lessons, a free, only slightly compressed wallpaper-sized example is available for download.

This tut is done on a PC, but so I won’t have to repeat each operating system’s keyboard differences constantly:

Windows:      Mac:

Shift key =   Shift key
Alt key   =   Option key
Ctrl key  =  Command key

What is displacement mapping?

In a nutshell, a displacement map is created from a pre-existing psd file when using Photoshop’s Displace filter. Actually, the last step in operating the filter is to open a psd file of your choosing as a basis for the map.

What does it do?

The filter forces the image that is the target for displacement to conform to the contours (hills and valleys) of the map. The target image “wraps around” the light and dark shapes in the displacement map image.

All you really need to understand about Displacement Mapping is that when choosing (or creating) the psd file for your map:

  • Light areas the map will raise areas of the target image.
  • Dark areas of the map will lower areas of the target image.

Let’s go…

Let’s see it in action with a low-rez, simple example. The images used are “bare-bones” so it will be easy to understand. I’ve included the psd files in a zip download at the end of the tut:

1. Open new document, 500px X 250px, 72dpi, rgb 8bit.

2. New layer, Edit > Fill, fill with white.

3. New layer, Rectangular Marquee tool (M), draw a rectangle at the top of the layer. Edit > Fill, (any dark color, I chose a blue (#012aff)).

4. Rectangular Marquee tool (M), draw a rectangle at the top of the layer.  Edit > Fill > (any dark color. I chose blue (#012aff).

Photoshop Displacement Map

5. Ctrl + C, Ctrl + D, Ctrl +V, to copy and paste the stripe as a new layer. Move tool (V) and position stripe an approximate equal distance from the top stripe.

Photoshop Displacement Mapping

6. Ctrl +V, to add more striped layers, moving each dark stripe into position before adding another stripe. Continue until image is full of alternating stripes.

Photoshop Displacement Map

7. Select all layers in the layers pallet except the background layer. Right click on your selected layers in the layers pallet, merge layers.

Photoshop tutorial

8. Make sure the merged layer is selected. Ctrl + T to transform layer. Up on the options bar enter 85% for both width and height. Press enter key.

Photoshop Tutorials

9. New layer, Edit > Fill, fill with 50% gray (has no effect on the displacement map; only tones above and below 50% gray will cause image to displace).

Photoshop Displacement Map

10. Press D to return foreground and background colors to black and white. Brush tool (B), choose a round brush of about 200px, Hardness to 0, Opacity = 100%, Flow = 50%. Draw diagonal lines alternating between white and black. You can switch between black and white by pressing X.

11. Filter > Blur > Gaussian Blur, radius=2.0

Now, we’ll make the actual displacement map from the back and white striped layer. Photoshop needs the map file to be a psd, so…

12. Make sure black and white striped layer is selected, Ctrl + A, Ctrl + C, Ctrl + D to select layer, copy to clipboard, and deselect. Ctrl +N, Press return key, Ctrl + V to place the layer into a new image.

13. Right click on layers pallet, flatten the new image (important! Photoshop wants a flattened psd for the displacement map).

Photoshop Displacement Mapping

14. Save file (make sure as “psd”). I usually just add “-map” to the name of the main file. For example, the main file for this tut is “reencoded_flag.psp” so I’ve named the displacement map file, “reencoded_flag-map.psd.” Close the file.

15. Back in main file, turn off the visibility of the black and white striped layer and select blue and white striped layer in the layers pallet.

16. Filter > Distort > Displace, leave settings at their default values. Press OK. Navigate to and open your previously saved displacement map file (reencoded_flag-map.psd in my case). Press Open.

Photoshop Tutorials

You have just forced the blue and white striped layer to conform to the shape of the displacement map file, in respect to its peaks (white stripes) and its valleys (black stripes). The illusion is a 3D effect, in this case of a flag waving in the wind.

17. For added realism, make the black and white striped layer visible, change its layer blend mode to hard light and lower the opacity to about 70%.

18. Make sure the black and white striped layer is selected in the layers pallet, Layer > Create Clipping Mask, to clip (or mask away) the portions of the black and white striped layer that are outside the “flag” layer’s outside edges. The down arrow on the indented layer says, “I’ve been clipped by the layer below me.”

That’s it.

This was (on purpose) a simple image demo that I hope gave you the theory behind the Displace filter and Displacement Maps. Swap out other images for the base picture and map and see what you can create.

Here’s a peak – you can also create something like the Image below. you can have it as a wallpaper.

click for full-sized image (1280 X 960 227kb jpg)

DOWNLOAD Violinist wallpaper (1280 X 960 227kb jpg)

DOWNLOAD tut files (98.3kb zip)

Author -

who has written 3 posts on [Re]Encoded.com.

I am a Web and Graphic designer living in Colorado, USA
Contact the author


3 Responses to “Photoshop Displacement Mapping”

  1. Freebies Says:

    Great tutorial, thank you very much.


  2. Diane Says:

    Thanks for the tutorial on the mechanics, but I hope you will follow up with how to do the violin lady on the curtain. That’s a really cool effect.


Leave a Reply