Cycles: Shadeless "Shadow-catcher" Material for Rendering onto Footage I am superimposing CGI over video footage, and have run into a problem in making materials for objects that act as 'shadow catchers'.

Essentially I want a shader that is shadeless—like an emitter—but catches shadows and light from other objects. This is so I can reconstruct objects in footage so other objects in the scene interact convincingly with them.

Here's an overcomplicated diagram to illustrate my point:


(In this particular scenario, the problem could be glossed over by using RGB curves, but that is definitely not the case with more complicated scenes)

Isn't this a common situation? How to the real guys do it? Thank you.

(I am welcome suggestions of other ways of doing this.)
Divide objects into 2 scene layers, move actors (Suzanne) onto layer 1, move backgrounds onto second layer, place lights into both of them.
Setup 3 render layers - First for layer 1, second for layer 2 and third for layer 2 with layer 1 excluded:





Render it with transparent bacgrounds, it will produce results like this:







In compositor divide render layer 2 (BG_With_Shadow) with 3 (BG_Clean) - you now have a shadow to multiply over your backdrop and layer 1 to composite into backdrop: