Shadow Catcher plugin in Cinema 4D Advanced Compositing - Part 2
I've had a few people ask me - Is there anyway to seperate the 3D object and the shadow? So here is a short tutorial on how I would do it.
So several... several years ago... 2008 to be exact, I posted this tutorial Shadow Catcher plugin in Cinema 4d in which I showed how to install the plugin and setup a basic scene, but now we want to do a more advanced compositing to separate the object from the shadow.
Part 1 - install the plugin and create a basic 3D scene... view it here.
Part 2 - use Advanced Compositing to separate the object and shadow alphas (This page).
Step 1. Setup the render settings to split the alphas
So the problem that the previous tutorial created, was that if we wanted to then do some colour correction in Photoshop or After Effects we would have one layer which contained both the object and the shadow - therefore we would be colour correcting both of them at the same time. What we want to do is have a seperate alpha for the object and a seperate alpha for the shadow.
Here is what we are trying to achieve....
So first in C4D go to the Render -> Edit Render Settings....
And highlight the Multi-Pass checkbox.
In the Save tab add 2 filenames - Regular Image and the Multi-Pass Image. Make sure the Multi-Pass format is Tiff (PSD Layers) and Depth 16 Bit/Channel and uncheck the Multi-Layer File option.
NOTE: The Multi-Pass Image is going to be the Object Buffer - This is black and white version of the frame, with the selected object in white.
Step 2. Setup the compositing settings on the object.
Now we want to tell C4D which object to give a seperate alpha, so now select just the object, and then go to Tags -> Cinema 4D Tags -> Compositing which will add the tag.
Now there should be an Object Buffer tab and simply enable Buffer 1.
Now go back to the render settings and then choose the Multi-Pass option, here choose the dropdown 'Multi-Pass...' next to 'Effect...' and select Object Buffer, this should automatically set the Group ID number as 1 which was the number given when using the Object Buffer Tab.
Step 3. Render to view the seperate alphas.
Now render this out with the 'Render to Picture Viewer' and choose the Layer tab. You should now see 2 separate alphas. One with the 'Object and the Shadow' and one with just the 'Object' which is the buffer.
Step 4. Example of how to use them in After Effects.
Now what you would want to do is simply place these new element/layers inside an After Effects composition and choose the 'Toggle Switches / Modes'. Then on the layers which need to be masked select the following.
- The higher layer with just the object choose Track Matte -> Luma Matte.
- The lower layer with just the shadow choose Track Matte -> Luma Inverted Matte.
Here is how it should be viewable with the different layers active.
Hope this helps.
Visitors also viewed these posts