Page MenuHome

Shadows of objects of excluded render layers are rendered
Closed, ArchivedPublic

Description

System Information
Win7/64, GTX 750 Ti

Blender Version
2.71.3

Short description of error
Shadows of objects are computed that that do not belong to an included render layer

Exact steps for others to reproduce the error
Open the attached file and render. You see a shadow on the cube. The shadow is casted from the plane in front of the camera. There must not be a shadow because "RenderLayer 1" only includes layer 1 for rendering whereas the plane belongs only to layer 2. Hence the plane must neither be rendered nor it must cast a shadow. Currently it is not rendered but it does cast a shadow.

Event Timeline

Willi (willi) raised the priority of this task from to 90.
Willi (willi) updated the task description. (Show Details)
Willi (willi) edited a custom field.
Willi (willi) added a subscriber: Willi (willi).
Antonis Ryakiotakis (psy-fi) changed the task status from Unknown Status to Archived.Aug 7 2014, 1:21 PM
Antonis Ryakiotakis (psy-fi) claimed this task.

Not a bug, go to lamp properties and in shadow panel and enable "this layer only"

This is not the point. An object must not cast shadows in layers it does not belong to.

Make the lamp belong to layer 1 and 2. Still the plane must not cast a shadow in render layer 1 because it only belongs to layer 2.

Brecht, you know this code well, do you have time to give a pointer here?

Yes, Brecht - or whoever - that would be nice. I'd like to continue.

Brecht Van Lommel (brecht) changed the task status from Archived to Unknown Status.Sep 9 2014, 2:46 PM

This is not a bug, it's by design. See this documentation:
http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Passes

Render layers are used to render different objects in the scene into different images. This way they can, for example, be color corrected or otherwise manipulated separately and then recomposed in compositing later.

Which objects contribute to which render layers are defined by these layer settings:

Scene Layers: only objects on these layers will contribute to the image.
Camera Layers: objects on these layers are directly visible to the camera. When an object is in the scene layers but not camera layers, it will still cast shadows or be visible in reflections, so it's still indirectly visible. This is equivalent to disabling the Camera in the Ray Visibility panel for the object. The way this works may be somewhat confusing at first, but it's designed such that render layers can be recomposed to give the full render, without any missing shadows or reflections.
Mask Layers: objects on these will mask out other objects appearing behind them. This is equivalent to assigning a Holdout shader for camera rays to the objects on such layers.
Exclude Layers: scene layers are shared between all render layers; however sometimes it's useful to leave out some object influence for a particular render layer. That's what this option allows you to do.

For what you want to do, you can use exclude layers in Cycles or separate scenes in Blender Internal.