The typical use of render channels is to render the scenes components,
such as ambience/diffuse, reflection or motion vectors into individual
images. As most of these components are calculated individually by
Mental Ray anyway they're not going to affect the time needed to render
the image. In addition, channels can be used to render partial or
multiple render trees, adding ambient occlusion, outputting mattes or
any other type of information within a single pass. In this case
however, you won't get them for free.
The project files used in this tutorial can be found at: http://dl.dropbox.com/u/3834689/CaffeineAbuse/Render_Channels.zip
Open the scene Render_Channels.scn from this issues CD. Select the Jigsaw_Piece_01 object and press  to open a Render Tree. Get a Store Color in Channel node and open its PPG. The Store Color in Channel can be inserted anywhere in your render tree to store a specific part of the tree to custom render channel. But it can also be used to store information that is not part of the actual material. In the Render Channel section of the PPG, expand the drop down menu and choose the AmbOcc Channel. Get an Ambient Occlusion node and connect it to the Input of the Store Color in Channel node.
Get another Store Color in Channel node. Open the PPG and click the Add button and enter RGB_Matte as the Render Channel Name and click OK. Set the Input color to pure red. Get a Color4_Passthrough node and connect the Blinn node to its Input. Connect the Result output of the Color4_Passthrough node to the Surface Input of the Material node. The passtrough node acts as a hub and allows you to store as many channels as you like. Open its PPG and click the Add button twice to add 2 channels. Close the PPG and connect each of the Store Color in Channel node to the Channels > Item inputs.
Repeat the procedure for the other Jigsaw pieces, but set the Color of the RGB_Matte channel to pure blue for the second piece, pure green for the third and pure black for the forth. Close the Render Tree. From the Render > Render menu, choose Render Manager... In the Render Channels Output section, click the Add button. Select the AmbOcc channel in the Render Channel drop down menu and click OK. Click the Add button again, select the RGB_Matte channel and click OK. Your pass is now ready for rendering, so click the Render button and choose Render Current Frame.
It's important to note that if you need to re-render one of the channels, you will need to re-render the entire pass which may take considerable longer than if you where using separate passes. So contemplate which is the most beneficial in any given scenario.
Read the full post>>