Alpha Channel

Many video compositing related projects require use of an additional 8 bit mask channel, usually called as Alpha channel, which controls how rendered graphics is inserted over other background graphics. This tutorial introduces the basics of Alpha channel use in Realsoft 3D.

Tutorial level: Medium

Example project: tutorprojects/rendering/alpha_ready

1. Model a simple test scene of a magnifying glass floating in space or load the provided test scene 'tutorprojects/rendering/alpha_scene'.

2. We will render the alpha channel information to a disk file using a format which supports the extra channel. Therefore, go to the 5th tab of the select window; it contains the output object library. If the list contains a Targa object, LMB click it to select it. If not, apply the popup menu New/Targa. Open the property window and make sure that the Alpha option is set. You may also set the Compress option to save some disk space.

3. Open the file render window from the pull down menu File/Render. Add the Targa output to the Active File Formats list and remove other active outputs. Define an appropriate file name, for example 'my_targa_test'. Then select for example rendering settings Quality_Over_Speed. Resolution can be 600*450 pixels. Hit the render button and wait until the image is ready.

4. Start the Show Image utility program; you can find it from the Realsoft program group of the Windows Start Menu. Use its File/Open pull down menu to select the rendered Targa file. If you used the example scene, the picture will look like in the adjacent example image.

The test scene rendered

Now use the Channels pull down menu of Show Image to view the Alpha channel. It is completely black! This is because we did not specify any Alpha values for objects. By default, the program processes no Alpha channel information at all, in order to speed up rendering in projects which do not use such information. Fortunately, it is very easy to assign the required Alpha values to objects, as we will see next.

5. Switch back to Realsoft 3D and select the root level of the hierarchy of geometric objects. Open the property window and go to the second Col tab. Select Alpha from the Attribute list and move the slider below to the full value 1.0. Now all objects have this Alpha value, because the target was the root level. Only the empty background space renders with zero Alpha.

Setting Alpha value for the whole scene

The root level defined alpha can be overruled in deeper hierarchy as follows: open the hierarchy of the magnifying glass object, select the item 'lens' and change its Alpha to a semi transparent value 0.5.

6. Let's tailor the antialiasing settings for optimal alpha channel quality. Switch to the Rendering Settings tab of the select window. On the property window, select the leftmost tab and open the Channels frame on the bottom. Pick Alpha from the Available Channels list. Hit the Add button so that Alpha appears into the Customized Channels list. Activate the inserted item and turn the Trigger Antialiasing option on. Now, not only color changes but also Alpha channel variations trigger improved sampling at object boundaries. This ensures good antialiasing for the Alpha channel.

Alpha channel Antialiasing controls

7. Go again to the File Render window and restart rendering. Then view the new image version in Show Image. Choose Alpha from the Channels menu to find out that now the image contains a nicely antialiased Alpha component.

More advanced information about Alpha channel use is included in the Compositing tutorial.

The Alpha channel of the final Targa image