Viva La Difference

Download the images used

The Difference merge mode is a strange one. It's often difficult to predict how it's going to affect the image, and, as a result, few bother with it. When used on a color photograph, it seems to turn the base image into a film negative. And, as we'll see in a minute, if the uppermost object is filled with white, that's exactly what it does.

Applied to color, the mathematics are complex, but in simple grayscale terms, Difference subtracts the brightness value of overlapping pixels on one object from the other, and what you see is the absolute value of the result. In brightness values, 0 is black, 255 is white, and the other 254 numbers are varying shades of gray. A few demonstrations will give you a better idea.

Open a new document, 200X200, white background. Use the Selection tool to make a circle in the center of the image and fill that with 50% gray (R:128 G:128 B:128).

Press CTRL+A to select all, and Create a New Object Via Copy in the Object menu. Right-click this new object and choose Properties, then change the mode to Difference. Your original image is now gone and appears to be filled with black. Why? Well, the images are exactly the same, there is no "difference." The Difference value is 0, or put in brightness value terms, black. Now press CTRL+F and fill the top object with black. The original image returns because the original image minus 0, the value of black, is still the original image. Can you predict what will happen when we fill the top object with white? What was white is now black (because white, value 255, minus 255= 0, black) and the 50% gray is still 50% gray (because 255-128 is still 50% gray).

Confused? Don't worry. You don't have to know the math to make Difference mode a useful feature. It is, in fact, the manner in which watermarking was first done on digital images. If you copy an image and type your name as a selection in the lower right corner, you can shift the brightness up a mere 1%, and it won't be noticeable. At least not until you register the two images and blend using the Difference mode and increase the contrast. It's also incredibly useful to make Objects (the Hemera Photo type of object). Place a digital camera securely on a tripod, put a vase of flowers on a table, and snap the shutter. Take away the vase of flowers, and take another picture. If you sandwich these two images in Difference mode, you'll have little trouble masking the vase and flowers, and knocking it out of the image for use elsewhere. Companies such as Industrial Light and Magic use Difference mode extensively for special effects.

But enough of that. What can it do for you right now? Delete the white object in your image, then once again duplicate the Base Image using CTRL+A and the Object menu. Change the mode to Difference so that image is all black. It's black because there's no difference between the two images. So let's make some difference. Select the Pick tool, and make sure your object is selected. On your keyboard, press the down arrow five times, then the right arrow five times.

How about that? Very interesting. But not a big deal. You can close that document. Open the Landscape.jpg, and duplicate it as an object, as before. Set the mode to Difference in the Object Properties dialog box. On your keyboard, press the down arrow twice and the right arrow twice.

You've just created your very own "Find Edges" filter. If you open the Object Properties dialog again and change the Transparency to 50%, you get a sort of "embossed" look.

Do note that when you move the top object like this, it may be necessary to trim the left and top portions of the final image. Close that document, unless you like it enough to save for reference.

The greatest beauty of Difference blending, especially when using some wild color schemes, is that, although the results are nearly unpredictable, it can often take your work in a direction previously unimagined. Here's something I discovered while attempting one of Kelly's Challenges at Stephanie's Bulletin Board. We need to work a bit large to demonstrate this, so open a new document, at least 600X600. Press CTRL+F and fill with a Multiple Color gradient, using #60. For the Fill Type, make sure that the Square box in pressed, second from the right. It should look like this:

Use CTRL+A and create a New Object Via Copy. Now press CTRL+F and fill it with the lines.jpg that you downloaded. Change the mode to Difference.

This smaller size doesn't quite do it justice, but never in my wildest dreams could I have come up with that. If you take a look at some of the mandalas in my Gallery, you'll see a lot of surprising color effects I didn't intend.

So, the next time you have an Object stack, perhaps you'll think like me, and say to yourself, "What's the Difference?"

Back to Tutorials

SkinTight Home