Aligning layers is one of the most common tasks I perform in Photoshop, particularly if I’m trying to composite two exposures or subtly different compositions of the same scene. One approach is simply to move the top layer around, nudging to and fro, until it looks about right, then turning off the layer visibility to check the alignment. This is, not to put too fine a point on it, a terrible approach. But it’s also the way most of us probably got our start, until it occurred to us there must be a better way.
That better way, then, is usually opacity. We realize that by lowering the top layer’s opacity to, say, 50% or 75%, we can see through the top layer enough to determine when it is aligned with the layer below. It’s simple, and at least moderately effective. I have no problem with this approach, except for one thing: There’s an even better way!
The best way to align layers perfectly and precisely is to set the top layer’s mode to Difference. In this mode, each pixel is rendered as the “difference” between the pixels in the top layer and the bottom layer. In practice, this means the image will appear almost inverted—like a color negative—with a lot of dark or black pixels, punctuated by outlines in color. The black pixels signify pixels in the top layer and bottom layer that are an exact match.
Think about that for a second: if the pixel turns black, it’s signaling a perfect match between the layer above and the layer below, at least in the location of that pixel. So if you move that top layer around while it’s set to difference mode, any time it falls into perfect alignment with pixels below, the image will appear pure black. Eureka!
When you’re compositing, say, two different frames of an interior scene that you want to turn into a wider perspective, rather than just guessing about when the images are in alignment, rely on the Difference mode to tell you the image is in alignment because it’s pure black. It’s a super-simple, super-visual way to know that your image isn’t just “pretty close” to being lined up, but rather that the pixels are in perfect alignment—making it that much harder for viewers to tell that the image is a composite.
It’s true that the manual use of Difference Mode is my favorite alignment approach, but there is another method that can be quite useful for aligning layers in Photoshop—particularly if you’ve got lots of different layers to sync up. It’s the Auto-Align Layers command, found under the Edit menu. To use it, simply select the layers you’d like to align (using option+click in the layers palette) and then choose Edit>Auto-Align Layers. This will prompt you to choose an alignment approach, which can be automatic, based on perspective, distortion reducing (to eliminate cylindrical and spherical distortions that can occur with wide angle panoramas) collage, lens correction, vignette removal or reposition only. It’s this last one that I prefer to start with, as it will not alter the pixels in any of the layers, it will simply align and rotate them as necessary. For serious blending of images that don’t align quite perfectly (precise alignment during capture being the best approach for easy alignment of layers in Photoshop), you may find that experimenting with these other options will yield preferable results. But if you’ve done your job well and created two images that should sync up well, the Difference Mode and Auto-Align Layers are two tremendous ways to align images in Photoshop.