In cycles we put enable shadow catcher for a geometry. Is there a possibility to enable the shadow catcher for the entire layer which has 50 components.
-
1Possible duplicate of How do I copy a property from an active object to selected objects? – Duarte Farrajota Ramos Apr 10 '18 at 04:58
-
But can`t assign shadow catcher for layer. – RajKumar T Apr 10 '18 at 05:31
-
Use a material override on the render layer – aliasguru Apr 10 '18 at 05:32
-
OK and how to connect shadow catcher to that material? – RajKumar T Apr 10 '18 at 05:39
-
There’s a Shadow pass that can be enabled for the render layer if that helps - as used in https://blender.stackexchange.com/a/105697/29586 – Rich Sedman Apr 10 '18 at 06:24
-
I have two layers. Layer 1 has a component that is moving for 100 frames, Layer 2 has 50 components they are static(not moving). The shadow of the Layer 1 component is cast on Layer 2 components. I will render the static Layer 2 only one frame and render Layer 1(moving object) with shadow catcher 100 frames. I am individually selecting static objects and enabling the shadow catcher, but can save time if could assign shadow catcher for the Layer 2. – RajKumar T Apr 10 '18 at 06:47
1 Answers
There's a weird setup which can make it work. We stumbled across that by accident here in the studio and initially wanted to report it as a bug, but it came in useful at times.
How the weirdo thing has to be set up
The thing is that when you put a plane between the camera, assign a transparent shader to it, and enable the Shadow Catcher option at the same time, any ray that passes through that plane seems to be altered somehow, resulting in the stuff behind the plane to be treated as a shadow catcher object. In this screenshot, I have put a small rectangle in front of the camera. Where it covers the scene behind it, objects become shadow catchers, in all other areas they remain unchanged:
The shader on the plane is really simple:
You can mix it with a diffuse shader if you want. The Mix Factor will then act as a strength slider. This way you can control the strength of the shadows!
Now, put that plane on the render layer where you need the override. Scale it so it covers the entire camera view area. If you have animated the camera, also parent the plane to the camera:
You can set the Max Display mode of the plane to Wire, so you can see through while working in the viewport.
This is how that layer looks rendered:
And here is that very .blend file to play with:
-
-
1@cegaton Can only make assumptions, but I would guess that in the code of cycles, the check for the is_shadow_catcher property is done on the camera ray. The transparent shader then allows to let that camera ray continue to travel across the scene, as if it has not hit yet an object. The next object which is hit then receives that first camera ray still, and the check for shadow catching has already happened for that ray and is not repeated. – aliasguru Apr 11 '18 at 04:43




