Premultiplied Alpha

There are two methods of storing alpha in a bitmap: premultiplied and nonpremultiplied.

To composite an image that is in nonpremultiplied format, the alpha must be multiplied by each of the R, G, and B channels before adding it to the color of the background image. This provides the correct transparency effect, but it must be done each time you composite. With premultiplied alpha, you store the R, G, and B components with the alpha already multiplied in, so compositing is more efficient.

This is not the only reason that 3ds Max stores images in the premultiplied format. When you render an image, you typically want the edges of the objects to be antialiased. This effect is achieved by determining the fractional coverage of pixels on the edge of the object, and then adjusting the alpha of the pixel to reflect this. For example, a pixel that is 30% covered by the object will have an alpha of 0.30.

To antialias the edges, the alpha must be premultiplied to darken these edge pixels. (This is equivalent to compositing the image over a black image). So it is natural, in a sense, for rendered images to have premultiplied alpha. If you do not premultiply the alpha of a rendered image, then just looking at the RGB you will see jaggies on the edges of objects. You would need to composite it against black using the alpha channel whenever you wanted to display it.

Note: To control whether or not the renderer uses the environment map's alpha channel in creating the alpha for the rendered image, choose Customize Preferences Rendering, and then turn on Use Environment Alpha in the Background Antialiasing group.

If Use Environment Alpha is turned off (the default), the background receives an alpha value of 0 (completely transparent). If Use Environment Alpha is turned on, the alpha of the resulting image is a combination of the scene and background image's alpha channel. Also, when you render to TGA files with Pre-Multiplied Alpha set to off, turning on Use Environment Alpha prevents incorrect results.

Tip: If you plan to composite objects in another program such as Combustion or Photoshop, render the objects against a black background. Otherwise, a fringe of environment or background color can appear around the objects.