This may be something very simple but I actually tried a bunch of things without any success.
I am looking or a setup that allows me to do this in 2.8+.
Let's say I have a cube sitting on a plane and I want to have two render passes the first one with the cube and the second one with the plane and the cube's shadow:
Scene
Pass 01, foreground
Pass 02, background + shadows
The setup was very simple in 2.7-, I just put the plane in the second layer and have 2 Render Layers foreground
and background
respectively. If I put the lamp on both layers, I get the result I want.
In 2.8+, however, we now have Collections and View Layers and I tried a lot of setups but none of them allowed me to have an equivalent of this. For instance, I tried puting the objects on two different View Layers but it doesn't allow the cube cast a shadow on the plane unless I use Holdout
wich just leaves a big hole in the place of the cube on the background pass. I also tried using Indirect only
but that renders the cube on the background pass.
Can anyone here suggest me a setup that can make this work?
Thanks in advance.