Fake Ground Shadows for 3D Objects

We’re basically going to pre-render the objects to make a matte for the shadow, then comp it back into the scene.

1. In action, animate your objects as you would normally. In my case, I created a particle setup of textured 3D bouncing balls. Then turn off shading, hide the background, and hide the front layers of the textures to make the objects pure white on a black background (which will of course appear gray until rendered).

2. Add a camera to the scene. We’ll refer to this camera as ‘shadowcam’. Change it from “target” to “free” in the camera menu dropdown box. Using side view and the camera menu, position the new camera above the scene and tilt it on the x axis 90 degrees so it looks down…where the actual light creating the shadow might be. You’ll need to position the camera pretty far above the scene to account for the next step. (Mine is at a y of 9650.)

3. Drag the FOV (field of view) way down (I used 12.5) to minimize the parallax effect inherent in the default FOV. Switching to shadowcam’s camera view, increase the camera’s vertical position in y until its field of view encompasses the full range of your 3d objects’ animation and that there’s no cutoff. The lower the field of view, the farther away from the object the camera has to be physically.

4. Using side view again, increase the far plane to account for the full range of the camera’s depth of view. (mine is at 10000.) Position the “near” camera plane in order to restrict the shadow’s visibility as it moves farther away from the ground. In the case of the bouncing balls, I adjusted the near plane to cause the object to be visible only for 5 or 6 frames as the balls approach the ground and bounce away. I used a near of 9785. (see fig.1 for sample camera settings).

5. Switching the camera to shadowcam view, render the animation. You should see the objects “popping” in and out of view as they approach and go away from the proximity of the ground plane.

6. On the desktop, take the rendered image and timewarp it 100%, with a mix value of about 3 or 4. You may have to experiment with this to get the fade off that you want.

7. Take this layer back into your action setup as a matte and make the front the shadow color. Turn it off to position it. Add an image for the shadow layer and tilt it -90 on the x axis and position it on the y axis so that it’s flat to the implied ground plane.

8. Using the shadowcam view, tweak the size and position in x and z of the shadow plane to line it up with the actual 3D geometry in the scene. You may have to move to a frame where you know the geometry is on the ground, so you can use that as a reference.

9. Turn on shading, textures, and layer fronts to see the shadow in the scene. Change to your main camera. You may need to tweak the position of the shadow a bit and mess around with blurring it on x and y to get the look right. See the final bouncing ball image with shadows on fig. 2.
note: for a single object/shadow, you could use an expression to tie the blur of the image in to the y position of the object, so that as the object is farther away from the ground its shadow gets more blurry, and sharper as the object is closer. This wouldn’t work with particles, however.

Also, the drawback with particles is that you could only have a ‘top down’ simulated shadow, as this doesn’t work with a shadow whose light(camera) is too much at an angle (the shadows wouldn’t line up with the particles properly).

This tip would also work if you used this same method to cast a shadow on a wall- instead of placing the camera on the top of the scene to capture the shadow you would just place it to the side, and make the “ground plane” the wall.

 

CLICK HERE TO SEE MOVIE

 

Submitter: Mike Roy