Save 80% and get all your credits upfront with the new yearly subscription! See details

5 Shopping Cart
Your cart has been updated
checkout
Categories

Cover image via

Casting a Shadow on a Moving 2D Element in After Effects

Eric Michener
Published:

Adding a shadow to a 2D element in After Effects helps sell a 3D effect.

Adobe After Effects

Drop a shadow from a 2D element in After Effects and match it up with the existing shadows of a piece of footage. This trick can give your video a nice cohesiveness and add an easy 3D effect to a flat object.

This effect is best if you use bottom layer footage with well defined shadows, I’ve chose this midday short shadow shot that I will drop a little looping cartoon on top of. Click any of the images below for larger view.

After Effects Shadow 2D

The general concept of this technique is that we are going to setup a virtual light to mimic the sun and a shape layer to accept the shadow, so you’ll first want to add a shape layer, draw a white rectangle with the shape tool and then make sure the layer is in 3D

After Effects Settings

Then you’ll want to add a new camera. I set my lens to 35mm because thats what I shot the lower layer at.

The goal is for this white rectangle to sit where the ground is and have the cartoon directly on top. I’ve started by rotating my rectangle 90 degrees at the X-axis and then tweaking its placement so it looks like its sitting on top of the ground.

Shape Layer Settings After EffectsShape Layer Settings After Effects

I need to make sure my animation is directly on top of the rectangle and has 3D mode turned on as we fine tune it’s placement. Flipping camera modes to top and side lets you place the element right against the rectangle at a 90 degree angle.

AE Comp 3D ModeAE Shape LayerShape Layer Settings After Effects

Once everything looks lined up, change the blending mode on the rectangle to multiply.

Blending Mode Multiple After Effects

Next you will add your light. Before you move it around, change a couple of settings on the shape and animation layer.

After Effects LightAfter Effects Light Settings

You want your shape layer to accept shadows but not lights and you want the animation layer to cast shadows and accept lights.

Light Settings After EffectsLight Settings After Effects

The next step is to move around the light in 3D space until your shadow starts to mimic the shadows from the video.

Light Shadows After Effects

Switching to different camera views is a good way to get a better feel of your light’s position and length of the shadow.

Camera Views After Effects

Here I didn’t notice that my image was accepting lights until I moved the light in front of it.

Here’s a gif of my final video, I added some color and motion tracking because the base footage wasn’t shot with a tripod.

A