Sunday, January 06, 2008

Non-Destructive Cloning



My favoite Texaco sign (in Talmo, GA) makes great cloining practice.
Let’s start by fixing my head-tilt. Select the entire image with ctrl-a, then transform it with ctrl-t. Twist the corner until it’s straight.

Clone on a new layer


Cloning on a separate layer gives us the opportunity to undo and discard our cloning. It’s much easier to fix our mistakes or change our mind this way. For example, if I did a photo essay on visual pollution caused by power lines, I’d want to bring those back.
Start by clicking the new layer button on the layers palette. If the layers palette isn’t visible, press F7.
Next, select the clone stamp (S). Make sure “Current and Below” is selected in the toolbar “Sample” options.
As you clone, the cloned pixels appear on the new layer, they don’t change the original layer. As a result, you can start over by throwing away the cloning layer. You can use this approach multiple times. For example, I might have one layer to fix the edges created when I rotated the image to straighten it out, and another layer to get rid of the power lines. This makes it easier to isolate choices and mistakes.

Tips for cloning


Work on the full size image


You want lots of pixels to play with. Start on the full size image, before you do any resizing. Zoom way in. Remember the space bar turns any tool into the hand tool, so you can hold the spacebar down, drag the image around, and when you release the spacebar the tool goes back to the clone stamp.

Modify the brush hardness to your task


Work with a soft brush when you’re not up against a hard edge. Work with a hard edged brush when you’re cloning near a hard edge.
Here I’m working with a brush size of 5px and a hardness of 90%. Away from the sign edge, I’ll use a larger brush, about 12px, and a hardness of 0%.

Use shift-click to clone in a straight line


Click once at one end of a line, such as the power line. Then position your tool over the opposite end of the line, hold the shift key down, and click again. The clone tool clones the entire line.

Avoid ghosting your target back in


You generally want to sample from as close to the target as possible so the tones and texture are as close as possible. Frequently though, you can run into yourself when cloning close by. The stamp tool clones by sampling the underlying pixels and copying them to the destination. It keeps taking from the underlying pixels until you release the mouse. The cross-hair indicates where the tool copies from. Note that in this case, I’ve moved the cross-hair to where the power line is and the destination down below the original line. Because of this, it copied the power line down as well, even though the area where the cross-hair is shows blank sky. The sample is coming from the underlying pixels, and the power line is still there.
When you release the mouse and click again, it picks up the changed pixels so it will begin copying clear sky. You have to balance the tedium of clicking a lot with the problems sampling from further away.

Know your keyboard shortcuts


· s for the stamp tool
· z for the zoom tool
· Spacebar for the hand tool
· [] (left and right brackets) to increase or decrease the brush size.

Aligned vs. Non-aligned


The “Aligned” checkbox controls where the sample starts from when you release and re-click the mouse. When you drag the mouse the sample position always moves in parallel to the brush. If the aligned box is checked, when you click again the new sample starting point is in the same relative position as the first time. If the aligned box is not checked, the new sample starting point is the original absolute position.

Layer order matters


In the image below, I’ve introduced a levels layer between the background and the cloning layer and adjusted the contrast. This brightened up the sky. Because the cloned pixels are copied from the lower level which is in its darker state, dark lines show up. Put your cloning layer directly on top of the image layer, or wait until the cloning is done and add the adjustment layer on top of both. Don’t forget you can change the order of the layers just by dragging them. Dragging the levels on top the clone layer fixes this problem.\

Working an edge


When cloning along an edge, you must take care not to distort the edge. To do this, you must line up the center of the sample with the center of the target. To do this, make sure the sample is right on the edge. When the alt key is pressed, the cursor turns into a “precision” cursor. Put it right on the edge before clicking the mouse. Without releasing the alt key, move the cursor to the clone target, and then click. If you need to later find the center again, you can press the alt key without clicking. Just holding the alt key down only shows you the center cursor, it doesn’t change the sample.

No comments: