Thursday, March 20, 2008

Displacement Maps

This filter is very complex. It is mainly used to have a design that appears on a three-dimensional surface take the shape of that surface. To do this it reads a second image called a displacement map and moves every pixel in the filtered image according to the values in the displacement map. White and black pixels in the displacement map have the most effect. They cause the pixels to be moved the maximum amount in opposite directions. A middle gray value in the displacement map causes no movement. You can use any grayscale or color image as your displacement map so long as it is saved in the Photoshop format. You simulate the bumpy effect of a natural surface by using the surfaces themselves to create the displacement map.

In the SIG I demonstrated an effect similar to painting large text on a fence, an effect of painting a flag on a brick wall, a flag on a cloth background and creating a reflection of a boat in the water. With the exception of the boat reflection I started with either the large text or the flag as a layer (layer 1) on the wood fence or brick wall background.

1. Open your image to be used as a surface and use it to create the Displacement map.

2. To do so, change the Mode to Grayscale, Image > Mode > Grayscale.

3. Then blur using Filter > Blur > Gaussian Blur, about 2-5 pixels will do depending on the image size.

4. Save this image in PSD format on your hard drive.

5. Open the image you want to place on the textured background and
Filter > Distort > Displace

6. In the dialog box enter a number in Horizontal and Vertical Scale of 10% for starters. many times it is a good idea to create a few maps with different settings to see what works best.

7. Select Tile and Wrap around.

8. Click OK and you will get a box asking to open a displacement map file. Choose the one you created and saved and click OK.

Your image should now be distorted to conform to the textured surface.

9. To get a more dramatic effect add the original texture as layer 1 on the image and change the Blend mode of this layer to Hard Light

In the example of compositing a sailboat on a water scene and creating the boat’s reflection, the boat was selected from it’s background and moved into the water scene as layer 1.

1. To create the reflection, copy the boat to a new layer and

2. Image > Rotate > Flip Layer Vertical

3. Move this layer down with the Move tool so it is looks like the reflected boat.

4. Now to displace the reflection to confirm to the water, use the Rectangle tool to select an area of the background water under the reflected boat and

5. Edit > Copy. Keep the selection active.

6. File New to create a new file. The size will be the size of the copy in the clipboard by default.

7. Edit > Paste the water to the new image and

8. Layer > Flatten.

9. Blur using Gaussian blur about 2-4 depending on the overall image size.

10. Save in PSD format as you displacement map.

11. Back to the boat and water image, with the selection active and the boat layer active,
Filter > Distort > Displace.

12. I set the Horizontal scale about 15 and the Vertical scale to 5.

13. After clicking OK select the saved displacement map.

The boat should now be distorted to confirm with the water.

No comments: