Displacement Maps in Photoshop

Displacement Maps

An incredibly useful and often overlooked tool in Photoshop, a Displacement Map is an ancillary image used to distort the image you’re working on in a specific way. In other words, you use one image to distort another. This is achieved by moving pixels in the working image based on lightness/darkness of pixels in the Displacement Map image. Where your Displacement Map image is dark, pixels in your working image will be moved one way; where your Displacement Map image is bright, pixels in your working image will be moved the other way. It is particularly useful when you’re trying to make the contents of your image look as if they’re following the contours of a surface of of some sort.

How to Save an Image for Use as a Displacement Map

  1. Open the image in Photoshop
  2. Increase the contrast by any method(s) you prefer (levels, curves, unsharp mask, etc.)
  3. Convert the image to monochrome (black & white) – the Black and White adjustment is best
  4. Save the image under a new name as a Photoshop .PSD file (JPEG and other file formats won’t work)

You may want to create a specific place on your hard drive for your Displacement Map images.

How to Apply a Displacement Map

  1. Open the image you want to work on (distort) in Photoshop
  2. Select the layer you want to distort
  3. Decide before proceeding what image you want to use as a Displacement Map: there’s no preview option for this filter
  4. From the main menu choose Filter > Distort > Displace…
  5. Choose the horizontal and vertical scaling you want to use – experience is your only guide
  6. If the Displacement Map image is larger or smaller than the layer or selection you want to distort, choose either "Stretch To Fit" or "Tile"
  7. Choose either "Wrap Around" or "Repeat Edge Pixels", according to your preference
  8. Navigate to the Displacement Map image you want to use
  9. Click OK and you’re done!
  10. Click Undo and repeat with different settings if you didn’t get the look you wanted on the first try…
     

A Real-Life Example

Click here to get large version of this imageBlack and white version Copy the image at left to your hard drive (click image to get large version).

Boost the contrast and convert it into black & white – you should end up with something like the image at right.

Save the B&W version as a Photoshop PSD file named "surfer_map.psd" and close the file.

Re-open the original, color image.

Write the word "WAVES" at the top of the image in a bold, sans-serif font in black. I used the Impact font at 160pt size in my example.

Make a copy of the text layer (Command+J in Mac, Control+J in Windows).

Now flip the new "WAVES" text over: From the main menu choose Edit > Transform > Flip Vertical.

Use the Move tool and move the flipped text down just below the original text so that it looks like a reflection of the original. The result should look something like the image at left.

Now, making sure the reflected version of the word "WAVES" is still active in the Layers panel, from the main menu choose Filter > Distort > Displace…

You’ll be presented with a dialog like the one shown here. It’s telling you that the Displace effect can only be applied to raster objects, not vector shapes like text, so you have to rasterize this text to proceed. Click "OK" and Photoshop will rasterize the text for you.

Next up is the Displace dialog shown below. We’ll take a quick look at the options available.

Displace Dialog Box

Horizontal & Vertical Scale
These are the most important settings – they control how much our working image is distorted by the brightness or darkness of the Displacement Map image. You’ll have to use trial and error to find the best settings.

Displacement Map
In many cases your Displacement Map image will be much smaller than the image you’re applying it to, so you have to decide if you want to stretch the Map to cover your entire image or keep it at its native size and repeat it across the area of your image (this is called tiling). In our example with an image that measures 900 x 600 pixels and a Displacement Map that is also 900 x 600 this setting will have no effect. (In the unusual case of a Displacement Map being larger that your working image the "Stretch to Fit" option will shrink the map image to fit.)

Undefined Areas
This controls how "undefined" areas (at the edges) of the image will be treated. What does this mean? The Displace filter, by its very nature, moves pixels around and can find itself without any image data to bring in to replace them. For example, if the pixels in the bottom left-hand corner are moved up and right they can’t be replaced by pixels from farther left or below – there aren’t any! The Undefined Areas setting tells Photoshop how to deal with this. (I am obliged to note that Adobe is very vague on all this and I can’t find any authoritative definitions of "undefined areas" on the web – it seems they really are undefined!)

Wrap Around fills the undefined space with content from the opposite edge of the image.
Repeat Edge Pixels extends the colors of pixels along the image’s edge in the direction of the distortion.

Whatever the details, the only way to find out which works best is to try them both.

In the Displace dialog set a horizontal value of 10 and vertical value of 5 (our image of water consists mostly of horizontal striations, so we’re applying more horizontal than vertical distortion); leave the Displacement Map at "Stretch to Fit" and Undefined Areas at "Repeat Edge Pixels".

When you click "OK" you’ll get a standard File Open dialog; just navigate to and choose the black & white "surfer_map.psd" you saved earlier and click "Open" to apply. Your rasterized reflection text should now be smeared mostly horizontally in a way that matches the ripples in the water.

To finish off the effect, change the Blend Mode of the displaced text layer to Overlay or Soft Light and dial down the opacity slightly if necessary. The result should look pretty much like the image below.

This entry was posted in Art & Design, Photography, Photoshop. Bookmark the permalink.

 

Click here to enable the Facebook 'Like' button

Comments are closed.