0
$\begingroup$

I'm trying to composite some lights using screening but while it looks fine head on, it shines through parts of my main object. Sorry my node setup is large; hopefully you can see it better when you click on the image.

Here you can see what I mean as the lights go through the hose:

enter image description here

Here is my node setup:

enter image description here

Thanks!

EDIT:

I found the solution. Not sure why this worked, but I just made the hose (and subsequently every other object on the first layer) a pass index of 1, and used an ID mask (with 0) directly from the first layer into the factor of the screen node.

enter image description here

Here's the updated render:

enter image description here

$\endgroup$
4
  • $\begingroup$ Easiest way is to enable "object or material id" pass and give appropriate pass index for this hose in foreground. Thus you get mask for this hose when you hit render next time. In compositor add "ID mask" node, choose index number you have created earlier, then substract this mask from lights right before blur/glow composing $\endgroup$ – Serge L Aug 16 '17 at 20:38
  • $\begingroup$ Hm I keep looking for tutorials with what you're describing, but it just doesn't seem to be working. Do you have a simple example you could show or link to one? Sorry I am not that familiar with compositing :p $\endgroup$ – lakerice Aug 17 '17 at 2:20
  • $\begingroup$ Glad you made it! But your glowing is a bit incorrect. Because glow is the matter of camera/eye perception and it should be seen in front of other objects $\endgroup$ – Serge L Aug 17 '17 at 18:45
  • $\begingroup$ Oh yes true. Still working on it...thanks for that tip too actually. $\endgroup$ – lakerice Aug 18 '17 at 2:47
1
$\begingroup$

My example was made in Blender Render, but it doesn't matter in this case. First of all enable Object Index pass in Render Passes tab, then give index 1 to your hose (note, that objects with same index will produce combined mask, and to keep them separate use different numbers).

Edit: Material index pass is usefull when your object can't be physically separated in parts, so apply different materials for these parts.

This is overall setup: enter image description here

$\endgroup$
1
  • $\begingroup$ Thanks for all your help! I checked out your .blend and tried to recreate it in my file, but for some reason it wouldn't work when i recreated it in my .blend. I must've missed something. However, I updated my question with the solution I found. $\endgroup$ – lakerice Aug 17 '17 at 17:54

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.