Render Layers: Masking objects, shadows and reflections


I am trying to mask one object in an animation. At the moment I am using a green cube to mask it and using the Node-Editor to bring the picture back to together.

I achieved to mask the object with this technique but now I’m confused how I can get rid of the part of the shadow/reflection from the object that is behind the mask.

Attached is a simple scene, where I am trying to receive this.

There is something I really don’t understand. I have 3 different RenderLayer.
The ground is on an different Layer than all the other objects and the material of the ground has a mirror effect.
So to render all the RenderLayer I have to select all the Layer and so I get the shadows and the reflection on the ground of the objects.
But if I use the Layer of the ground by itself no shadow and reflaction appear. So why do they appear in the RenderLayer, because there I selected only the Layer with the ground. I guess it should Render it without the shadows and the reflection, shouldn’t it?

Any help would be very nice…
Greetings dechgo


Green_Screen_test1.blend (704 KB)


another more basic question, hopefully someone can help me with that…

I really don’t understand how blender creates shadows when you are using RenderLayers.
For example a very basic setup: One ground plane, two different cubes which are standing on the plane and one point light
So everything will be on a different layer. Cube1 on layer 1, cube2 on layer 2 and the ground on layer 3. The point light is on all of the 3 layers.
So I select all the 3 layers and render it and I get this output:

So how can I get now the plane by itself without the shadows when I am using RenderLayers.
I set up 2 RenderLayers.
RenderLayer1 called “Ground” and has only Layer 3 selected (because there is the Ground-plane).
RenderLayer2 called “objects” has Layer 1 and Layer 2 selected.
So i set up compositing and use the different RenderLayers. But now RenderLayer1 “ground” renders this picture:

So now here is the thing I really don’t understand. I select only Layer 3 (where the ground is and Render it again without any RenderLayer settings, then I get this picture:

Here are now no shadow. So thats what I do not understand. Why are the shodows on the plane, when I seperate it with RenderLayer.
So to get rid of the shadows I can select the camera icon for shadows in the render passes and then no shadows appear. But what can I do when I want to see only the shadow from one object??
In this example I could try to use the compositer to remove one shadow, with some masking technique. But when the 2 shadows would start to overlap I don’t see any chance to remove one certain shadow, because the shodow pass will always give me both shadows and not a single one…

I even tried to use different lamps, because the shadow is related to the light source and in this setup the light is an all 3 layers. But even when I use 3 different light sources, the shadow of the cubes always appear on the plane…

So if anyone has some information about this and could help this would be great.
Because this really confuses me…

Greetings dechgo

Maybe you could send lamps and their objects to seperate render layers then on the lamp property select this layer only. That way you could seperate lamps to certain objects but im not certain that the render pass will respect the seperate lamp layers.

Hi David,

thank you so much for this tip.
This realy works. This problem realy bothered me very much and I thought I will go crazy :slight_smile:

So finally a solution and the best part of it, the settings realy make sense.
In Blender it is very often one little button which might be the reason if it works or not, but If you don’t find this button you will have a hard time :slight_smile:

So thank you very much again!

Greetings dechgo

Wow I tripped over a solution. Theres a first after 2688 posts.

Glad I could be of help.

Hi David,

there is always a first time :slight_smile:

So but now I have another problem. When I turn on AO, I have the same problem like the shadows. I just can get the AO from everything and not from different objects.
So that only on of the cube is included in AO calculation…
Does anybody maybe has an idea for this??

Greetings dechgo

Perhaps seperate scenes, sorry i can’t think of a way to split AO.

Hi David,

thanks for your answer.
I also thought about separated scenes and already tried it and then the AO can be only from one object.
But, I am not sure, I guess the render time will double, won’t it?

if you’re clever and only render the AO twice [excluding reflections and sss or whatever], It might not be so bad.
try using the materials override in the layers section to easily blank out all heavy materials.

Thanks casio for this tip,

this is a good idea, should try this…

But maybe I just don’t use AO, than I dont run into all these problems and the render time will be better…

Thanks again…
Greetings dechgo