Table of Contents

The Alpha Replacement Property Panel allows you to assign channels from other layers to be used as an alpha channel in the current layer.


Properties


UI Path: ||Property Panel|| > Alpha Replacement panel

 

Alpha Source – Assigns any channel from any layer in the scene to act as alpha channel for the current channel.

Alpha Source Layer – Specifies a layer to act as a source. You can do that by cycling through the available layers with the right and left arrow or by right clicking on the layer chooser and picking a layer from the Alpha Source context menu.

Channel — Selects a channel from the Alpha Source Layer to be used as Alpha source. Again you can cycle through the different channels in the layer or right click on the channel chooser and select a channel from the Channel context menu.

Invert Source – When enabled, inverts the Alpha Source channel.

Stretch to Fit – When enabled, stretches the Alpha Source layer to fit the current layer.

Source Mode – Specifies a blending mode for the source channel. The available options are ReplaceCombine with and Multiply with. 

Layer Channel – Choose with which channel from the current layer you’d like the source channel to blend. You can choose either by cycling through the options within the layer chooser with the left and right arrow or by right clicking on it and choosing a channel from the Channel context menu.

 

 


 

Example: Alpha Mode Comparisons

 

 

Ignore Alpha – The image is treated as fully opaque. The existing alpha channel (if any) is ignored. The alpha channel of the result will show a white rectangle.

Normal Alpha– The foreground color is mixed with the background color according to the formula:

foreground * alpha + background * ( 1 - alpha ) 

 

As an example, a 70% opaque red foreground - (R:1.0, G:0.0, B:0.0, A:0.7) - and a green background - (R:0.0, G:1.0, B:0.0) - will be combined to form the color (R:0.7, G:0.3, B:0.0).

This blend mode is suited for images with independent color and alpha channels. These images can be color-corrected without running into problems with their transparent portions (such as antialiased edges) no longer blending correctly.

 

Premultiplied Alpha - The first portion of blend formula above - foreground * alpha - does not depend on the background color, so it's possible to perform it beforehand. This is known as pre-multiplication - the image color is pre-multiplied by the alpha channel. Such images are mixed with the background according to the modified formula:

foreground + background * (1 - alpha )

 

Since the foreground has already been multiplied by the alpha, this produces the same results as the "Normal Alpha" formula when applied to the original, non-premultiplied image data.

Getting back to our example, the premultiplied equivalent of our foreground color (R:1.0, G:0.0, B:0.0, A:0.7) will be (R:0.7, G:0.0, B:0.0, A:0.7) and the result of its composition over a background color (R:0.0, G:1.0, B:0.0) will again be (R:0.7, G:0.3, B:0.0).

If a non-premultiplied image is composed over a black background - a color of (0.0, 0.0, 0.0) - the Normal Alpha formula gives us:

foreground * alpha + 0 * (1 - alpha )

 

which is the same as:

foreground * alpha

 

In other words, the result of a non-premultiplied image composed over black is a premultiplied image.

The reverse operation - obtaining a non-premultiplied image from one that has already been premultiplied - can be accomplished in an image editing package by using the "Remove Black Matte" command.

(Note that the accepted terminology in this case - Normal Alpha and Premultiplied Alpha - is a bit confusing as it is the image color being premultiplied, not the image alpha.)