Shadow passΒΆ
To composite CG objects into an existing image, you may need a shadow pass image.
The shadow pass can be computed rendering the virtual ground twice, with and without shadows.
We assume here you have setup some render layers to get the props and the ground rendered separetly, with shadows.
To render the ground without shadow, we will create a new RenderPass. We will need a dedicated RenderGraph, which remove the shadows, connected to this RenderPass.
- Duplicate the render pass as NoShadow.
- In this new render pass, keep the Ground layer and delete all the other layers.
- Create a new
Create/RenderGraph which removes all from the Shadows set, like this - Set the
NewRenderGraph > RenderGraph > Order to 10, to make sure it is evaluated after the main RenderGraphs. - Press
NewRenderGraph > RenderGraph > Edit and connect the new RenderGraph to the NoShadow render pass. This RenderGraph is now evaluated only for the NoShadow render pass.
- In a compositing tool, import all the images.
- Divide the ground with shadow image by the ground without shadow image.
- Multiply the result by the orignal image.