Object from Blender Cycles, shadows from Blender Render- possible?

I need to render an object in Cycles, but use the shadows from Internal rendering of the same object.
So far to avoid receive shadows in Cycles I have used the Emission property. To render only the shadows in Blender Render I enabled the ‘Cast only’ on the object’s material, but they can’t be combined.

If for example Blender Render could mask the shadows (not draw shadows under the object) and also make the rest area transparent, I could just mix the two images.

So, does anyone know of a way to achieve this?

Use the object in Blender Internal as a mask?

How can I make it a mask?

Use the render layers tabs in Internal, set your object on one layer and then set up another layer for your shadow catcher - then you can set up the object as a mask there.

I’ve tried a few things, but I can’t find the right combination. Can you mask the shadow in this example?
EDIT: I mean cut the shadow to be like the Apple logo -with the ball invisible.

Anyone else?

I just found one possible way, but I’m not satisfied as it can only be applied to static objects not bone-animated:
Just cloning the ball and applying a different material with transparency enabled, alpha=0 and all casting options disabled, is enough to cut the shadow as bellow (and even eliminate sphere but it is better to set the main object to ‘shadows only’):


Now if only this could be done without cloning the main object…

I’m at work, but I will try to set up a simple file later to explain. The idea behind using render layers is that you can include your animated object in both render layers, but in the one use it as a mask to exclude it. No duplication of mesh objects needed.

Any Cycles material rendered in Blender Internal is a mask by default, there is no setup needed. I show an example of this in my video around 7:30 seconds into it.


After almost two days of trying things out, I found a simple way without using multiple renderlayers or complex compositions!
The problem was to have an object in Blender Internal to cut it’s own shadows (without appearing itself and with the background transparent):


And here is the test file: http://www.pasteall.org/blend/30778