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 as described in this article:
Let me know if this is usefull.