1

This question and its answers give nice ways of creating plane shadow catchers that make the CG objects "interact" with the HDRI world.

My question is very similar, but different in the sense that I don't want the HDRI world ground to catch my shadows. Instead, I want a transparent plane to catch my shadows. Something similar to this short video tutorial, which succeeds under lamp lighting, but fails to do so under HDRI lighting.

Sibbs Gambling
  • 719
  • 2
  • 15
  • 30
  • There is no "shadow catcher material" yet in cycles (there is work being done, but it it is not part of the current version at the end of 2016). If you read the second answer on the link on your question you'll realize that the trick is to have geometry to catch the shadow on a different layer and you composite that into your image. –  Jan 01 '17 at 01:24
  • 1
    related: http://blender.stackexchange.com/questions/28491/does-an-hdr-environment-texture-affect-the-shadow-pass and : http://blender.stackexchange.com/questions/5416/why-does-the-shadow-pass-not-account-for-mesh-lights –  Jan 01 '17 at 01:27
  • 1
    also related: http://blender.stackexchange.com/questions/40423/is-there-anyway-to-match-a-sun-lamp-to-the-direction-of-the-sun-in-an-environmen/40450#40450 and http://blender.stackexchange.com/questions/19765/cycles-shadeless-shadow-catcher-material-for-rendering-onto-footage and http://blender.stackexchange.com/questions/40278/why-is-my-shadow-catcher-layer-shadow-pass-entirely-black –  Jan 01 '17 at 01:28

1 Answers1

2

A Hacky way to do this is by using a few render layers and object or material IDs

For a scene like this, where the object is lit exclusively by the environment (no lamps on the scene)

enter image description here

Make a copy of all of the objects, move them to a new layer and set new layer to use a single white material.

enter image description here

Set the render layers so that each render layer corresponds to the layers for the scene and excludes the other layer.

For the Layer that will hold the shadow only make the objects invisible to camera, so that the only information on for the layer will be a plane and the shadow. Make sure you enable material Index for the first render layer.

enter image description here

enter image description here

Give the object on the first render layer a material ID: enter image description here

In the compositor set the Render layer with the shadow over white using alpha over. This will become the base image to use for whatever compositing you want to do.

enter image description here

If you combine it with the Material ID/Index Pass you can then create an alpha channel with the object and the shadow, to be used to key the original image.

enter image description here

enter image description here

  • +1 for the great answer (as always!). I believe this follow-up question must be trivial, but how do you make only the shadow catcher plane transparent? I don't want the background to be transparent. Many thanks! – Sibbs Gambling Jan 01 '17 at 05:27