Simple one pass shadow catcher. [Nope Failed again]

I have left this up but it only works in certain situations.
It’s good in those situations but like everything it needs tweaking.
Old post below.

OK I know that there is one on it’s way in the official release in the near future but I came up with one that works.

My computer died so I can’t post my latest version however I is pretty straight forward.
Take the default cube
Bevel it
Subsurf it
Set the surface to smooth
Make sure your object and camera is inside the cube.
Invert the normals so they face inward.
Assign 2 materials.
One to the single face on the bottom and one to the rest.
The basic surface is a diffuse with the HDRI mapped to the colour.
On the floor just use this as the material.
On the rest use a light path node (is camera ray) to control a mix shader,
of the base material and a transparent shader ( base to the bottom input)
And render it.
Simple hey.

Limitations:

The transparent shader creates shadows on itself so you need to ensure that a wall is in line with the camera.
Back lighting also creates these shadows.
Here is an image showing both results.
The back left wall works nicely and the right wall shows the shadow in the transparent.



And here is a basic blend file with the HDRI NOT included but you can sort that out.
tmp_4281-ShadowIdea-2231301184.blend (468 KB)
Have fun. And if some one works out how to remove the shadow in the transparent that would be good.

P.S.
Be warned this introduces a heap of noise.

Ok Here is a noodle for the walls. I allows for reflections on the objects within the cube.