8
$\begingroup$

What is the Alpha Convert node used for? I've never seen any tutorials on it. Also, if there are several good uses for it, examples would be great!

$\endgroup$

1 Answer 1

10
$\begingroup$

It's used for manually converting between Straight and Premultiplied alpha. This is sometimes needed when using external images in compositing, among other uses.

See the wiki:

Straight Alpha

This is the alpha type used by paint programs such as Photoshop or Gimp, and used in common file formats like PNG, BMP or Targa. So, image textures or output for the web are usually straight alpha. RGBA color are stored as (R, G, B, A) channels, with the RGB channels unaffected by the alpha channels.

Premultiplied Alpha

Rendering will output premultiplied alpha images, and the OpenEXR file format uses this alpha type. So, intermediate files for rendering and compositing are often stored as premultiplied alpha. Compared to straight alpha, the colors could be considered to be stored as (R*A, G*A, B*A, A), with the alpha multiplied into the RGB channel.

This is the natural output of render engines, with the RGB channels representing the amount of light that comes toward the viewer, and alpha representing how much of the light from the background is blocked.

Conversion

Conversion between the two alpha types is not a simple operation and can involve data loss, as both alpha types can represent data that the other can not, though it is often subtle.

Straight alpha can be considered to be an RGB color image with a separate alpha mask. In areas where this mask is fully transparent, there can still be colors in the RGB channels. On conversion to premultiplied alpha this mask is 'applied' and the colors in such areas become black and are lost.

Premultiplied alpha on the other hand can represent renders that are both emitting light and letting through light from the background. For example a transparent fire render might be emitting light, but also letting through all light from objects behind it. On converting to straight alpha this effect is lost.

$\endgroup$
2
  • $\begingroup$ Ok, I think I understand, but when would you be most likely to use this? $\endgroup$ Mar 16, 2014 at 19:57
  • 1
    $\begingroup$ Only ever use associated alpha. Unassociated alpha doesn’t work. To give an example, try rotoscoping a vibrant rainbow image. If you blur the image, the colours will bleed from beyond the alpha. Only with associated alpha does the proper thing happen; the values are blurred and no contamination takes place. $\endgroup$
    – troy_s
    Jan 20, 2019 at 1:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .