Friday, January 28, 2011

Adobe Photoshop's Secret Weapon

Here's a quickie for a Friday.  We'll take a look at an extremely under used tool available in Adobe Photoshop CS5 and several preceding generations.  To start with we have a well exposed shot of the moon and a shot of a church scene in late autumn.  If we were looking for a simple shot of the moon in the clear space of the sky we'd have a one click for that.  Just change the Blend Mode.  There's several options, such as using a Screen Blend Mode or a Lighter Color Blend Mode.  Either will do a pretty good job of dropping out the black of the moon Layer.  Our Background Layer would be the shot of the church and the upper Layer would be the moon.  That's all well and good, but it makes a rather uninteresting image.  More interesting would be the moon behind some of the branches of the tree.  If we were to simply move the moon over the branches with the straight Bland Mode switch the moon would appear in front of the branches.  That wouldn't fool a three year old.  The church with the branches is one image, yet we want to slide the moon behind the branches.  There's a hard way and there's an easy way.  To find out what the two methods are, hit the "read more".
 The first thought might be to make an Alpha Channel Mask.  Reasonably easy to do.  Go to the Channels Panel and flip through the Red, Green and Blue Channels.  The best contrast comes from the Blue Channel.  Drag the icon drop to the Create New Channel icon at the bottom of the panel.  Next, let's go to one of Photoshop's scariest dialog boxes, Calculations (Image/Calculations).  There's plenty of options to chose from in this dialog box.  We can pick which Channel we want to start with and which one we want to match it up with.  The first option presented as we open the dialog box is the Blue copy channel as Source 1 and the same Channel as Source 2.  Scrolling through the Blend Modes results in not that great a Black/White possibility.  Changing Source 2 to the Green Channel and scrolling through the Blend Modes again gives hope that we can create a high contrast Alpha Channel to work with.  The best bets are Linear Dodge (Add) and Add.  They're the same result in this case but that won't always be true.  Make sure the Result is set to New Channel and click OK.  We can't use Adjustment Layers on Alpha Channels, so we'll use a straight Levels adjustment (Image/Adjustments/Levels).  Boosting the Blacks and White increases the contrast until we have "almost" a complete B&W image.  Further clean up can be done by getting the Brush Tool (B), setting the Brush Blend Mode (in the Context Aware Bar at the top of the page) to Overlay.  Set the color to the Defaults (D) and switch back and forth (X) as needed.  Paint over the branches.  With the Brush in the Overlay Mode, painting with Black will only affect tones from midrange to Black.  Painting with White will only affect tones from the midpoint (128) to White.  Going back and forth (X) between Black and White will allow clean up of any remaining grayscale.  We finally have a mask.  We can apply it to the moon image and then uncouple it from the moon image.  That way we can move the moon independently from the mask and place the moon wherever we like.

Now, let's use Photoshop's Secret Weapon and simplify things from a ten minute build of a Mask to a thirty second fix with total flexibility.  If you've ever used a Drop Shadow, an Inner Glow, Outer Glow, Bevel and Emboss you've probably open the Layer Style dialog box.  Easiest way to open it is to double click on the Layer you're interested in applying a style to.  It will open to the default screen or Blending Options.  Down at the bottom of the box is the secret.  It's the Blend If sliders.  You can control the relationship between the upper Layer and the Bottom Layer.  Since we want to drop out the Blacks in the moon shot, just move the Black slider for "This Layer" to the right.  The Black goes away.  If you need to find tune the edges the slider can be split.  Just hold down the ALT key and pull the tick mark away on one side.  All done!  You can move the moon "behind" the branches at will and end up with an image that looks more like today's final image.