Support

  Tips & Techniques - Compositing

Compositing:
Creating Shadow Catchers
Download:
Project
Works with:
R8
Requires:
Version 8+
 


 
When compositing elements from your 3D package into a photograph it is often necessary to create proxy objects called shadow catchers in order to sell the illusion that the CG object is actually in the scene. This tutorial will take you through the steps of seeing where such objects are needed and how to go about setting up these shadow catchers.

 
Initial Setup

Step 1: Download the project file included with this tutorial and open the file called Background.c4d in CINEMA. You can see that there is a Background object with an image applied to it. Your first step is going to be aligning your editor camera so that it matches the image perspective.


 
So simply use your Move and Rotate view commands to get the Editor Camera in the proper position. Once you've done so you can create a Camera Object (Objects=>Scene=>Camera) which will automatically orient itself to your current view. This has been set up for you already in the ShadowCatcherFinal.c4d file.

 
It is also useful to know what focal length was used for the photograph so you can use a matching focal length in your Camera Object. The default works fine for this image. The coordinates I used for the Camera in this scene are X: -1595m Y: 985m Z: -2280m H: 48.5 P: -7 B: -1.

 
Step 2: Now that your Camera is set up you can bring in your 3D elements and position them in the scene. For this example you'll be compositing a trash can model beside the curb. Go to File=>Merge and select the TrashCan.c4d file also included in the downloadable project file.

 
Move the trash can model so that it appears to be resting on the pavement in the lower right of the image around a foot or so away from the curb. The coordinates I used are X: -933m Y: -62m Z: 692m.

 
Lighting

Step 3: Your next step is to recreate the lighting for the scene so that the shadows are cast in the proper places. The lighting is about midafternoon here. So create a light to represent the sun and place it at these coordinates, X: 5845m Y: 3470m Z: 3870. These are just the coordinates I used to simulate apporximately where the sun would be at this point.


 
In the Attributes Manager with the Light selected you're going to want to make a few changes. Choose a slightly golden color for the Light to simulate bright sunlight, then also set the Type to Spot (Round) and the Shadow to Soft. You're using a Spotlight because it only generates 1 soft shadow map as opposed to the 6 that are generated when using an Omni Light with Soft Shadows.

 
To easily align your sunlight to the proper area you can assign a Target Expression to the Light (File=>New Expression=>Target Expression). Select the Target Expression Tag and drag the Trash Can object into the Target Object field. The Light will now point at the Trash Can's axis.

 
Now you should create a couple additional Lights to serve as fill lights. These will help illuminate the dark parts of your Trash Can as well as create the proper density and color of the shadows. The color of these fill lights should somewhat match the color of the other shadows in the image. Make sure these fill lights are not casting shadows. I've also added a separate fill light for only the Trash Can illumination (No Specular).

 

 
Creating the Shadow Catcher

Step 4: You'll notice if you render out your scene at this point that you don't have any shadows since there is nothing to "catch" the shadow... no surface for the shadow to be cast upon. You need to manually create these objects so you can get shadows into your scene.


 
For simple compositions sometimes a simple Floor object will suffice for the shadow catcher, other times you may need to build several object depending on the shadow's projection. In this instance you have multiple ground levels because of the curb. So you'll be creating a simple representation of that curb and the surrounding ground so that a shadow can be cast there.

 
Create a Plane Object (Objects=>Primitive=>Plane) and position it at about the center of your view. Go ahead and increase the size of the Plane so that it covers enough area to catch the shadow of the Trash Can.

 
Step 5: Make the Plane editable (Structure=>Make Editable) and switch to Points Mode (Tools=>Points). Move the Plane so that one of the rows of points lines up closely with the top edge of the curb. The initial coordinates I used are X: -2135m Y: 0m Z: 419m.

 
Step 6: Select all of the points that extend over the curb and move them down a bit and then back along the X axis to rebuild the curb structure. You may have to tweak the points a bit to match the image exactly. Activate X-Ray in the Attributes Manager to do this more easily. I've also added a slight Edge Bevel to the top and bottom of the curb to soften the edge a bit.

 
Step 7: Once you've set up your shadow catcher to your liking you need to "hide" it so that only the shadows are seen against the background image. To do this you need to first apply the same Background material to the Plane object. With the Texture Tag selected, change the Projection to Frontal in the Attributes Manager.

 
Step 8: Now add a Compositing Tag (File=>New Tag=>Compositing Tag) to the Plane and in the Attributes Manager uncheck Cast Shadows since you don't want the shadow catcher geometry creating its own shadows anywhere. Then you're also going to check Compositing Background. This will cause the object to be self illuminated yet still recieve shadows, so your Plane will blend in seamlessly with the self illuminated Background image.

 
You've now got shadows cast realistically within your scene to sell the composition.


© 2008 All rights reserved. For the personal and/or professional use of Cinema 4D users only. Reprint without permission is strictly prohibited.

© 2010 All rights reserved
Copyright Information |
Privacy Policy | Terms of Use