21.6. Bump Maps
In the world of 3D animation, bump or displacement maps refer to grayscale images that tell the software how to render a smooth surface so that it appears to have a three-dimensional texture. This is an efficient way to produce bumpy surfaces such as brick walls, gravel, and tree bark without having to physically create each bump and crevice on a surface.
In the world of Photoshop, we achieve similar sleight-of-hand (or sleight-of-mouse, if you prefer) using displacement maps with the Displace filter.
When working with displacement maps (also called dmaps), the color value of the dmap — a value from 0–255 — determines the direction of the movement of displaced pixels. If we were to start at 50 percent neutral gray (a value of 128) and increase the brightness of the color in the dmap, pixels would shift farther up or to the left. Going in the other direction — that is, darkening the values of the dmap — pixels would shift down or to the right. And what about a value of 128? Those pixels would stay exactly where they are.
Photoshop only recognizes displacements maps saved as flattened native PSD files. They can be created from single-channel grayscale files, in which case the direction of the displacement is both up and to the left, or down and to the right. Complicating things somewhat, displacement maps can also be generated as RGB files, in which case the grayscale contents of the first channel — the red one — control the horizontal movement, and the green channel ...
Get Photoshop® CS4 Bible now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.