A Useful Alpha Channel
By Skip Allen
Corel® Painter™ 12.1 Alpha Channels are very powerful and very useful, too. This tutorial will describe how to use an alpha channel to remove the background of a photograph.
The photograph in Figure 1 is pretty awful, but could be used as a clone source. The background is definitely a stumbling block. Carefully outlining the image with the lasso tool results in a selection that could be used to delete the elements of the background, but I find this method tedious. Painting the flower white in a new alpha channel provides a similar selection, but it is difficult to follow the precise outline of the flower with a brush. Instead, I use the following method:
- Open the image in Painter and save it as a RIFF file.
- Select the image layer by clicking Select > All, or use the shortcut keys Command + A (Mac OS) or Ctrl + A (Windows).
- Float the image layer by clicking Select > Float, and then click on the image with the Layer Adjuster tool.
- Click Window > Auto-Painting Panels > Underpainting to open the palette containing the Auto-Painting, Underpainting, and Restoration panels.
The Underpainting panel
The Underpainting panel is one of the more powerful tools in Corel Painter. A single click of a button can change colors, values, brightness, contrast, and more. This panel has a number of presets that prepare an image for auto-painting or for cloning. With the advent of the Clone Source panel, multiple images can be cloned easily. In this tutorial, I will use the Underpainting panel to create a grayscale image. Then I'll use the Express Texture effect to change the layer to black-and-white. From there, I'll create an alpha channel.
- In the Layers panel, right-click on the Layer 1 icon and select Duplicate Layer (see Figure 2). The duplicate layer will appear at the top of the stack and will be selected.
- In the Underpainting panel, choose Black And White from the Photo Enhance list box, or drag the Saturation slider all the way to the left, and then click the Apply Underpainting button at the bottom of the panel. This will change the image from color to grayscale (see Figure 3).
- Next, we'll change the name of the duplicate layer. In the Layers panel, right-click the top-most Layer 1, and choose Layer Attributes (if Layer Attributes is grayed out, click on another layer, and then click the top-most layer to reactivate it). In the Layer Attributes dialog box, type Express Texture in the Name box, and then click OK.
- Click Effects > Surface Control > Express Texture.
- In the Express Texture dialog box, choose Image Luminance from the Using list box. Adjust the Gray Threshold slider to approximately 76% and the Grain slider to approximately 152%. You want the background to be black and the flower to be white. In the Preview window, you can drag to move the image around to check if you have achieved your goal. When you are satisfied with the result, click OK (see Figure 4).
- Next, we need to open the Channels panel, which is nested in the Layers palette. Click Window > Channels, or click the Channels panel in the Layers palette.
- In the top-right corner of the Channels panel, click the Channel Options button and choose New From.
- In the New From dialog box, choose Image Luminance from the list box, and click OK. This will create an alpha channel based on the value of the image (see Figure 5).
- In the Channels panel, right-click the Alpha 1 layer and choose Channel Attributes. In the Channel Attributes dialog box, type Express Texture in the Name box, and then click OK.
- This next step is very important. In the Channels panel, click the eye icon beside the Express Texture channel to turn it off, and then click on the RGB channel to activate it. If the RGB Channel is not active, then the layers panel cannot be used (see Figure 6).
Note: This particular image was fairly easy to convert into a black and white image, but it wasn't perfect. After making the channel, you can paint directly on the channel to get the image as a black and white selection. In my example, I am not painting around the outline, but covering white spots. To paint in the channel, select the channel in the Channels panel and select a versatile brush or pen. You cannot use any of the wet brushes or plugin types. Corel Painter will warn you if you have selected an ineligible brush. Turn the eye icon beside the RGB channel off, which will display the channel in grayscale, or in this case exactly like the Express Texture image. Using black, paint out the white dots and streaks that are not flower or stems (see Figure 7).
- Click Select > Load Selection. In the Load Selection dialog box, choose Express Texture from the Load From list box, and then click OK. The flower will be selected.
- Click Select > Invert Selection. Now the background is selected.
- In the Layers panel, select the color layer (Layer 1), and then press Delete (Mac OS) or Backspace (Windows). This will remove the background and you have the channel saved for future use (see Figure 8).
This technique has many uses and you can alter these steps to fit your needs. If this is the first time you have used channels, I hope it will encourage you to explore their many uses. I enjoy using "New From" Image Luminance to keep an image in grayscale and then using the selections while cloning. It is especially useful when working with watercolor.