How to use multiple ID masks

Hi I’m somewhat new to Blender and I’m trying to figure out how to make multiple objects in a scene glow using the compositor. So far, I’ve been successful in making a SINGLE object glow using the node editor but I can’t seem to make multiple objects glow at the same time. I’ve tried using ID masks and material pass indexes, but they don’t work for me for some reason. I tried finding the problem but I don’t know too much about blender and I couldn’t find info anywhere else about how to solve it. Here’s a picture of a quick scene I made in blender depicting two cubes. One has a pass index of 1 and the other with a pass index of 2. I’m trying to make one cube glow a cyan-ish color while the other one glow a pink-ish color. But the problem is that only of them is glowing in the render.

In your picture, the Add Node “Mix” factor needs to be changed from 0.0 to 1.0. Right now you’re telling the node NOT to use any of the bottom input.

If I change the mix fac to 1, the only thing that happens is that the cube that is glowing stops glowing and the other cube starts glowing.

On closer examination (sorry!) your overall node setup needs some rearranging. You’re using your ID Masks to REPLACE the render with your solid color (the cyan and magenta). Note that the blurred ID Masks are the Fac for the Mix node, thus determining where you see the image, and where you see the solid color.

My suggestion is to do something like this:

Pipe the image into a Mix Node, set to Screen. Use your Blurred ID #1 as the Fac, with the color of your choice (vary the brightness of the color to increase or decrease intensity). Then take the RESULT of that Mix Node and plug it into another Mix node, again set to Screen, but this time using your Blurred ID #2 as the Fac. Again, adjust the color to taste. Send the result into the Output.

What you’re doing here is adding glow with your first ID, then adding additional glow with the second. You could do this as long as you had IDs to use.

Hopefully this makes sense; let me know if it doesn’t. Happy Blendering.

Thanks a lot! Works like a charm. :smiley: