Separate objects from green backdrops with presicion and control. Learn how to mask fine strands of hair and a translucent glass cup.
Identify the Green Backdrop
Before we add layer mask, we need to identify the green areas and create an black and white layer to represent the transparency of the image.
Open a photo you would like to edit. Or, you may use the photo used in this tutorial (from iStockPhoto). Make sure that the image is in RGB color mode. To switch to RGB color mode, click on RGB Color under the Image> Mode menu.
Add a Channel Mixer adjustment layer (Layer> New Adjustment Layer> Channel Mixer). In the Channel Mixer window, check the Monochrome checkbox and set the Red to 200% and the Green to -200%. Don’t close the Channel Mixer window yet!
Now drag the Constant slider towards the right until the object is a 100% white; not gray. Don’t go overboard with the constant setting. If the constant is set too high, the images’ edge detail will be loss.
You’ll notice that after apply the Channel Mixer adjustment layer, the green areas are not completely black. If we leave this alone, the greens will only be 50% transparent instead of 100% transparent. To fix this, select the Background layer and open the Hue/Saturation tool (Image> Adjustments> Hue/Saturation or Ctrl+U). In the Hue/Saturation tool, select Green from the Edit drop down menu and increase the saturation until the green areas turn black.
Convert Layer to Mask
Before we can add a layer mask to the Background layer, we need to unlock it. To do this, simply double-click on the layer and a New Layer window should appear. The default settings are fine. Click OK.
Add a layer mask to the layer we have just unlocked (Layer> Add Layer Mask> Reveal All).
Make sure the layer mask is activated. The thumbnail of the layer mask in the layers window should have a white border around it. If it doesn’t, click on the thumbnail to activate the layer mask.
With the layer mask activated, open the Apply Image tool (Image> Apply Image). We’ll be using the default settings in the Apply Image tool so simply click OK unless the settings on your screen is different from the image below.
Now that we’re done converting the Channel Mixer layer into a layer mask, we can delete the Channel Mixer adjustment layer.
Remove Green Edge Artifacts
The image is masked, but most likely it will have green artifacts near the edges. Before we can call this project complete, we need to remove those artifacts.
Create a new layer (Layer> New Layer or Shift+Ctrl+N). In the Layers pallet, move the layer to the bottom.
Fill the bottom layer with a 50% gray. To do this, press Shift+Backspace and the Fill tool should appear. Select 50% Gray from the Use drop down menu and click OK.
With a 50% gray background, the green edges are clearly visible and the background will help us with the next step.
Select the top layer and open the Hue/Saturation tool (Image> Adjustments> Hue/Saturation or Ctrl+U). Select Green from the Edit drop down menu and set the saturation to -100. Immediately green edge should disappear.
Coding and gaming go hand-in-hand, though that doesn’t mean coders are always gamers and v…