Logo

Logo

Monday, October 7, 2013

How to add compositing nodes to a single object using pass index (without multiple renderlayers)

Sometimes you want to add only compositing nodes to specific objects in your scene.
The most common way to do this is to use multiples renderlayers. Anyway, this method is quite long and implies long calculation times as new layers have to be rendered individually.

Another usefull way is using the pass index settings:

1- Select the object on which you want to add composite nodes. In "Relations", set the "Pass Index" from 0 to 1. This index will identify the object in the Node Editor.



2- In the RenderLayers tab / Passes, check the Object index box:


3- Open the Node Editor and add the following nodes as depicted below:


 The ID Mask purpose is to filter the object pass index you entered at step 1. Then by mixing the RenderLayer image with a black image and applying the alpha output from the ID Mask node to the Fac input of the mixing node, you get only your object on a black background. A Chroma Key node can then be used as well to add a transparency mask.

Here is a quick video to show you how to blur a single cube in a scene with multiple objects:


Hope this is usefull.

1 comment: