Monday, January 12, 2009

Displacement maps in photoshop elements

This follows a tutorial on the The idea was to take a wooden post that I had photographed and somehow super-impose it on a face. My first attempt ended up being ok, but the wood is not contouring with the face. 

Pinocchio - before the lies 

This week I revisited that image and Garrey suggested that I look into using a displacement map to make the wood contour with the face. The tutorial site has the following steps. 

  1. Prepare the image that you want to act as the contour: In this case it is a face. The basic steps for preparation are 
    • Expand the contrast (make a duplicate layer and set the top layer to overlay mode) and
    • convert to greyscale.
    • Apply a gaussian blur. Save this blurred image as a PSD file (photoshop) file with map in the name to remind you that it is for a displacement map - you will use it later (don't close the file). In the case of my image I only wanted to apply this to a face so I selectively erased all but the face and applied this procedure to the resultant file.
    • Now undo the blur that you applied to the image you saved. This leaves you with the greyscale if the face that will be used for contour.
  2. Applying the map to the target image (in my case a white wooden fence post) requires the following steps.
    • Bring the target image (the one you want to displace) as a new layer on top of the greyscale image you kept.
    • Use the free transform option to resize the target image layer so that it is a little larger than the greyscale below it. The displacement will change the size and you need some breathing room.
    • Set the mode of the target image layer (your top layer) to multiply. The greyscale of the wooden post shows through the image now as tones where the contours will go (but there are no contours yet).
    • Now go Filter->Distort->Displace and set the amount of displacement. The tutorial recommended 50 each for horizontal and vertical which works fine for a flag blowing in the wind. I settled on 20 each for the face. When you have set those you are asked to choose the displacement map and you have to browse to the blurred map file you saved before. Photoshop will apply the map and you will have contours.
  3. I found that some of the displacement didn't work as expected so I used the liquify filter and moved some of the lines a little manually to fill in where the displacement map failed. Here is the resultant image.
I also decided not to make the image black and white as before - I left the color in and applied a selective hue/saturation mask to the face - leaving the hair and eyes their natural color.

Pinocchio Take 3

No comments:

Post a Comment