Displacement Maps

Introduction

In this lesson we learned about displacement maps by creating one.

What are displacement maps?

A displacement or height map is a greyscale texture in 3D modelling. Black and white pixels equate to a value (0-1) in the computer, which is used to calculate the height, or distance from the camera each point of the image is.

Once applied, a displacement map texture makes a 2D surface look 3D.

Creating a displacement map

In photoshop, I started by importing an image that I would be using to create the 3D effect. Here is the image I chose:

I then created a layer and filled it in with black. This would be the background layer of the displacement map. It is filled in black to tell the computer algorithm that it is furthest away from the camera.

I then created 5 empty layers and selected all of them and set their opacity to 20%. painting layers of white would create the grayscale image that the algorithm uses to generate a 3D effect. This is what my layers now looked like:

I then temporarily reduced the opacity of the black layer so that I could see the image underneath.

On the first layer, I painted everything that wasn’t the background of the image in white.

On second layer, I then painted in parts of the image that were closer to the camera.

I repeated this process on each layer, painting in parts of the image that were closer and closer to the camera.

Doing that gave me this grayscale displacement map image.

I imported the displacement map and the original image into after effects. I then added a fast box blur effect to the map so that the effect would look more natural and gradient-ed.

Next, I hid the displacement map and added the displacement map effect (under the distortion category in the effects menu) to the layer with the image of the wolf. I set the source of the effect to be the displacement map layer and set the other drop-down menus as luminance, because the map was greyscale.

Then I was able to use the horizontal displacement slider to make the image move and look like it was 3D.

I animated the effect and here is the exported video:

Conclusion

Today I learned an interesting new skill in after effects, to add to my experience with using the software. I also was able to use after effects in conjunction with photoshop, showing that the adobe software can be combined and used to create things greater than the sum of their parts.

Leave a Reply

Your email address will not be published. Required fields are marked *