Alpha channel

The alpha channel is a black & white image containing information about where a specific object exists and where it does not. White in the alpha represents an object, black represents empty space. It is useful as a clipping mask when you want to isolate an object and composite it with another object (for example: clipping a car render and pasting it over a photograph).

Opaque option

With transparent objects the alpha normally takes into account the amount of transparency of the object and renders with varying degrees of grey - for example very dark grey for very transparent objects. It is possible to render a completely white alpha also for transparent objects with the Opaque option. This can be useful if you want to maintain the full look of the transparency from the render, instead of blending it with any other images in your composite.

From left to right: Render, Alpha with opaque option OFF, alpha with opaque option ON

Basic usage

The most common purpose for the alpha channel is to use it as a selection mask to cut out the rendered object from its background so that it can be freely moved and pasted over a different background.The easiest way to work with the alpha channel is to use the Embedded option in the Render options and choose an output format which supports an embedded alpha channel (TGA, PNG, TIF and EXR formats). This way, when you open your output image in Adobe Photoshop for example, the render will be 'pre-cut' and your render will have a transparent background.

In case you use the Separate option, the following describes the correct procedure to cut out your objects from the background. It is valid for Adobe Photoshop but is very similar in other image editors.

Step 1

Open both the render image and the alpha channel in your image editor.

Step 2

Because the alpha channel rendered from Maxwell is in RGB mode, you can either select only one of the R,G,B channels of the alpha OR convert it to the sGrey profile in Photoshop (Edit>Convert to Profile, and choose sGrey).

This step is important, otherwise you may see a thin white line between your objects and any background you cut out objects into.

 

  • Option 1: Selecting only one of the channels in the alpha. Select one of the channels in the channels palette. Then Ctrl+A to select all, then Ctrl+C to copy.



  • Option 2: Converting the RGB alpha into greyscale. Make sure the alpha image is the active document in Photoshop and go to Edit>Convert to Profile and choose sGrey from the drop down list and click OK. Then select the entire alpha image with Ctrl+A, then Ctrl+C to copy it.

Step 3

In the render image, switch to the channels palette, create a new channel and paste the alpha channel in this new channel (Ctrl+V). Next, hold down Ctrl and click on the thumbnail of this new channel - this will load it as a selection.

Step 4

Switch back to show the RGB image by clicking on the "RGB" row in the Channels palette. Next, switch to the Layers palette, click on Background to make it the active layer and press Ctrl+C, Ctrl+V to copy / paste the object using the selection into a new layer.

Step 5

Finally, from the top menu go to Layer>Matting>Remove black matte. This will remove the thin black line that is left over because of the black background. You now have a separated object on a new layer which you can paste over a new background.

Photoshop action

Click here to download a Photoshop action that does the same thing as the steps described above. To use it, load it first in Photoshop from the Actions palette. Then open your render and alpha image. Click on the alpha image window so it's the selected document, and run the action (default hotkey assigned to it is F12).

 

A note on black backgrounds when rendering with Alpha channel

Maxwell Render will automatically render a black background if you've specified to also output the alpha channel. This is to ensure that the object can be cut out properly using the alpha channel and the "Remove black matte" option in Photoshop (found under Layer>Matting). A similar option exists in other image editors.

An example showing why this is necessary:

Comparing two renders - with/without a black background. Both renders would produce the same alpha map and the illumination on the sphere itself is exactly the same. The sphere has been rendered deliberately out of focus to show what happens at the edges of objects (which always fade into the background even when in perfect focus because of the antialiasing applied).

 

The first sphere has a background which changes in brightness and the out of focus parts of the sphere mix with this changing background. After using the alpha to cut it out of the background, those areas with changing brightness remain. It is not possible to remove them using either "remove black matte" or "remove white matte".

Because the second sphere is against a perfectly black background, there is a dark border left after cutting with alpha, but it can be perfectly removed using "remove black matte".

 

 

 

 

Â