Selecting objects is an important part of any photo editing workflow, but often, highlighting is not as easy as it may seem. In this lesson we will explain how to make a selection of glass, including transparent elements. Let’s start!
The final result.
Materials for the lesson:
Glass of water
Selections are an integral part of image processing in Photoshop. The process of creating a selection is simple, but not always. Sometimes transparent areas of objects can make them difficult to distinguish and cause difficulties in their separation. For such cases, the usual method of separating an object with a tool Pen (Pen Tool) is insufficient. To select objects with different levels of transparency, we need a tool or team that will allow us to control the brightness of the information from the color channels of this image. Because we are not only interested in creating a simple separation contour, it is rather more interesting to create a mask, where we can save different brightness information in order to determine different levels of transparency. Since the channel is an image in grayscale, we can effectively use it to create a mask, because the mask also uses grayscale to store transparency information (white = 100% opaque and pure black = 100% transparent).
One of the main advantages of having access to individual channels in Photoshop is the ability to create selections. You can use separate channels to create different selections in the image. When you want to highlight a specific area of an image, use the color channels that provide the greatest contrast around the edges of this area.
This is the original image of a glass of water. Although this image is in CMYK mode, the same process will work in the case of an image in RGB mode. The only difference will be in the palette. Channels (Channels). Instead of four color channels and one composite as in CMYK mode, the image in RGB mode will have three color channels and one composite. The goal of this lesson is to remove all the black areas of the image, but to completely retain the glass cup, the water, the bubbles, and the reflection below the glass. Thus, we can use the separated glass on any other background (pure color or photo). In this tutorial we will use the command External channel (Apply Image), which is in the menu Image – External Channel (Image> Apply Image).
Team External channel (Apply Image) allows you to overlay a single image layer and a channel, with a layer and a channel of the active image. But remember that Dimension (Pixel Dimensions) images must match so that the names of the images appear in the External Channel dialog box.
But in our case we do not use two images. We mix a copy of the black channel with itself, using the section options purpose (Target) in the External Channel dialog box. Here you can also set the blend mode that you want to use when blending.
Open the file in Photoshop. Then in the panel Channels (Channels) examine the channels and find a channel with good contrast. It is very important to create a selection, find and identify the most contrast channel.
The screenshot below shows that the black channel shows a good contrast between the glass and the background.
Copy the black channel by simply pulling it onto the icon at the bottom of the channel palette Create a new channel (Create new channel). You can also right-click on the black channel and select Duplicate channel (Duplicate channel).
Then activate a copy of the black channel and go to the menu Image – External Channel (Image> Apply Image).
To begin with, in the External Channel dialog box, set the blending mode Multiplication (Multiply). This will intensify the black color and also convert any gray areas of the entire background to more black. In section purpose (Target) reduce Opacity (Opacity) up to 50% to ease blending. Otherwise we could eliminate some non-pure white areas.
Blend mode Multiplication (Multiply) reads the color information in each channel and multiplies the base color by the blend. As a result, using the blend mode multiplication, we always get a darker color. Any color in blend mode Multiplication (Multiply) in conjunction with black color, it will always end up with exactly black color. Using blending mode Multiplication (Multiply), we remove any gray areas in the background.
Now use External channel (Apply Image) twice, changing the blending mode to Overlap (Overlay) to enhance white. This time use Opacity (Opacity) 100%. Now we can easily highlight the white areas. The purpose of this process is to create an effective, fast and acceptable mask.
Blend mode Overlap (Overlay) multiplies or brightens colors depending on the base color. Primary color does not change, but is mixed taking into account the brightness and darkness of the original color. White areas become brighter, and black areas become darker. Using the blend mode Overlap (Overlay) we increase, strengthen white areas, and black we mask.
We can still adjust the black channel copy using the tool. Brush (Brush), drawing in white or black. Using white color, we save these areas, if black, then vice versa, we delete (mask). White color means the opaque areas in the channel, and black – transparent.
Load a selection of a copy of the black channel by clicking on its thumbnail with the Ctrl key pressed, or press the first button at the bottom of the channel palette, which will also perform an action with the selection.
Then go to the layers palette and duplicate the background layer by dragging it to the corresponding icon at the bottom of the layers palette. You can also right-click on the background layer and select Duplicate layer (Duplicate Layer).
Leave the layer with a copy of the background active and, without removing the selection, click on the mask icon at the bottom of the layers palette to add a layer mask.
Create a new clean layer below the masked layer and fill it with red or blue. Check the quality of the mask. You can see that there are some gray areas within the mask.
There are two methods for removing unwanted, gray areas. Although the first method, described below, will give the best result, but still let’s consider both.
Consider the first method. Change the blending mode for the layer with the background copy to Light replacement (Lighten), which will remove gray areas.
Blend mode Light replacement (Lighten) reads the color information in each channel and the pixels that are darker than the colors being mixed are replaced, but not lighter. As a result, dark, gray pixels are removed.
Now consider the second method. Click the thumbnail of the layer mask with a copy of the background, holding down the Ctrl key to load the selection of the mask. You can download the same selection from a copy of the black channel.
Now click on the icon for creating new adjustment layers at the bottom of the layers palette.
Select new adjustment layer Levels (Levels).
In the level settings dialog box, first drag the midtone marker and then move the white highlight marker to remove the gray areas or, rather, turn gray to white.
After applying the blend mode Light replacement (Lighten), if you look closely, you can see several damaged parts in the white areas. You can use the tool Stamp (Clone Stamp Too) and fix these patches.
That’s all science. Now you can use these methods to separate objects with different opacities.
Below may consider versions Before and After.
And here is the result! Good luck!