1
$\begingroup$

I'm fairly new to using the compositor and I have this issues with having 2 renderlayers, one for the glare of the reflections. and one for the glare coming from the lights as some sort of glow basically.

now since those lights will sometimes be behind certain meshes and such, they shouldn't show through. how can I resolve this with still keeping the glare from the lights. but those little LEDS masked off by the mesh

enter image description here


as you can see, the practice file works great enter image description here

but when I take the same steps in the actual model file I end up with this where the glare is not showing at all:

enter image description here

or this, this happens when I change the pass index to 1 in the ID mask node

enter image description here

would really love to hear what I can do next to resolve this. thanks in advance for your help!

$\endgroup$
3
$\begingroup$

I think you are looking for the ID Mask node. For an example, I set up a simple scene with one object inside of the other.

enter image description here

If you go to the Render Layers tab and check the box next to the material index pass, it will now add a pass for all of the different material indexes.

enter image description here

Next, you have to set the indexes of your materials. In the materials tab, go to the bottom of the material that you want to set the pass index of. In the very bottom, under settings, there is a setting that says Pass Index. You can set that to whatever number you want to use for that material. The default for the background is 0, so I set my material pass indexes to 1 and 2.

enter image description here

After Rendering, open the compositor and get an ID Mask node. Plug the IndexMA output from the Render Layers node into the input of the ID Mask node. Then you can connect the Alpha output of the ID Mask node into the input of a viewer node to see the result. You can then change the index value of the ID Mask node to whatever index you set your material indexes to.

enter image description here

You can then use the ID Mask node for what it says it is, a mask.

$\endgroup$
  • $\begingroup$ Thank you for you information, I tried recreating the scene you made to practice with and I did get the result that I wanted. but when I did the exact same on the car model it still did some weird things I can't seem to post any pictures in this comment but I'll clarify myself down here somewhere. here's what I found " $\endgroup$ – Jeroen Van de Water Sep 4 '18 at 12:26
  • $\begingroup$ Could you post the .blend file that you are working in? I could take a look at it later $\endgroup$ – Ben Sep 4 '18 at 12:31
  • $\begingroup$ Sure @Ben, where can I drop it for you? $\endgroup$ – Jeroen Van de Water Sep 4 '18 at 12:35
  • $\begingroup$ Put it in the post blender.meta.stackexchange.com/questions/658/… $\endgroup$ – Ben Sep 4 '18 at 13:34
  • $\begingroup$ It's fixed now, I forgot to make the lens in front of the leds passable as well, you can't see the individual bulbs and the lining on the lens right now. but that's for another day, thank you all so much for your help! $\endgroup$ – Jeroen Van de Water Sep 4 '18 at 13:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.