Displacement Maps

By loweho
6
written 4/17/06 10:47 AM, published 4/17/06 10:47 AM
   We've all seen the pics where a flat image of a flag or face is mapped around an object like a brick wall, cloth, or wood planks, so it looks like is actually around the object. Like this Popup Linkmap around a blanket . Well, how do day do dat?  Normally, it's done by using a displacement map.  What's a displacement map, you ask?

  Displacement maps are grayscale images in psd format, whose brighness values are used to displace pixels in another image based on a set formula. The brightness values effect the image this way:
  Medium Gray (50%)... does not effect the selected image.
  Medium Gray to Black... each step value decrease in brightness moves the pixels in the selected image down and/or right a distance prescribed by you in the distort filter dialog box. Black is max movement.
  Medium Gray to White... each step value increase in brightness moves the pixels in the selected image up and/or left a distance prescribed by you in the distort filter dialog box. White is max movement.

  The dmap can only have one layer but can have more than one channel. If more than one channel the first determines horizontal displacement the second vertical. All others channels are ignored.
  The dmap can be smaller than the image or larger and can be made to fit the image or tiled to fit the image.
  It's usually a good idea to apply a small amount of gaussian blur to the dmap so that PS doesn't spend time trying to map each little variation in the dmap.

  For demo here our dmap is a photo I took of our blanket converted to grayscale image the same size as the target image, 800x600 and has 1pixel of gaussian blur filer applied.

Here's the two pics I used: Popup LinkFlower image for target   Popup LinkBlanket image for dmap

Open target image and select layer you want to displace.
Select Filter-->Distort-->Displace, a dialog box opens. Popup Link(fig 1)
Setup dialog box as follows...
Enter 10 for both horizontal and vertical scale values.
Check Shrink To Fit.
Check Repeat Edge Pixels.
Select ok, new dialog box opens. Popup Link(fig 2)
browse to where dmap grayscale psd is stored and select it.
Image should appear slightly smeared in the general shape of dmap Popup Linklike this.

Now we need to overlay the image with the dmap.
Open dmap psd file in separate window.
Select it and Ctrl-A to select all and  Ctrl-C to copy, or drag it's layer over and drop on target window.
Select target image and Ctrl-V to paste dmap to new layer, not needed if you did drag and drop.
Select grayscale dmap layer on target image and change blend mode from normal to hard light and set it's layer opacity to about 65-75%. Popup Link(fig 3)
Ta da.
Popup LinkFinal result!

  This is just to get you started.  You can increase the H/V scale values for more dramatic effect or only use one, Use the levels on the grayscale dmap to control whether it displaces the dark or the light areas. You can use a photo for the source of dmap or use the filters in PS like the cloud filter. Use your imagination and have fun. If you make something intresting post it so we can enjoy it too.

  As always, this probably has mistakes and/or could be improved. If anyone has suggestions or corrections feel free to add them cause I want to learn too. I did it on the quick but I don't think I left anything major out.



 
  • You so Smaat! Thanks.

    - Pigs CAN fly!

    Please sign in to rate.


  • Thanks again Lowe. You keep trying to teach me something ...eventually I may learn something.

    - Good Kitty No More

    Please sign in to rate.


  • Well Done, Sir!!

    - NATURE RULES!!!

    Please sign in to rate.


Only registered users are allowed to post comments. Please sign in or create an account.