Render Layer confuzzed...

Hi guys, I have a small problem that I’ve never been able to solve. Below is a screen shot of my node setup (forget about me leaving the composite node out, that’s irrelevant)

I need to apply effects to only the lights on the car, but they are showing though the car! how do I hide the lights behind the car?? as logically the rear lights cant be seen from the front, but the glow is still there

btw, the lights are on their own render layer

Well if you just paint the light over the image, the image will not block the rear light. You need to take tat rear light out. Or you need to add real light on the car object.

you need to make the car-layer as a mask for the lights. ctrl-click on the layer-icon with the car in the renderlayer of the lights, so that you have a little black dot in the layer icon. that way the lights will be blocked in the area that the car is in front of it.

If you want to keep your light FX separate, you’ll need to make a matte (mask) that occludes the processed tail lights behind the silhouette of the car. You can do this with a partial matte so the headlights stay in front, or put the headlights and tail lights on different Render Layers so they can be matted/processed separately.

To make your base matte you can probably just pull one off the Alpha channel of the car, depending on how you have set up the other Render Layers. If you decide on a partial matte, you’ll have to do some garbage matting to trim the car’s alpha silhouette to just the part you need to occlude the tail lights.

EDIT: Or, do what sebastian_k said :D. Sounds like the simplest approach. But you’ll have to place the headlights & tail lights on different Render Layers for that to work, I believe, otherwise the car will occlude the headligths as well.

Ok, I’ll try that. One thing. I only have 2 render layers. one for the lights and the other for everything else… is this bad?

Nothing “bad” about it but it would probably be more effective if the headlights and tail lights were on different Render Layers (depending on how you do your matte work) so the car layer can be “sandwiched” between them, so to speak. That way the car can occlude the tail lights but not the headlights.

thanks guys, but i managed to make a quick fix… since it’s an animation, in the frames where you cant see the tail lights, i moved them far far away where you cant see them. then in the frames where you can see them, you cant see the front lights, so i did the same thing, just the other way round… but thanks for the help anyway