(Page 2 of 2 pages for this article  <  1 2)

Thursday, October 03, 2002

Lurking in the Shadows

Managing shadows in After Effects requires tweaking both the settings and relative positions of layers and lights.

Life on the Edge

The sharpness of a shadow’s edge is also controlled by more than one factor. The easiest to grasp is a light’s Shadow Diffusion setting. This parameter is defined as a number of pixels; at first glance, you might be tempted to think it means how many pixels of blur is being applied to the shadows. What it really defines is the “size” of the light (a parameter some may be familiar with from traditional 3D programs).

The Shadow Diffusion parameter - illustrated at right - controls how large the virtual light is, which in turn affects how spread out the edges of shadows are.

If a light was infinitely small, light rays can come from only one place. This means they hit a layer’s edge from only one angle, casting a nice, clean, sharp shadow onto another layer. However, if a light had some width to it, the rays it casts would be coming from different angles – some from the left edge of the light, some from the right edge of the light, and others inbetween. This scattering of light ray angles results in the edge of the shadow being spread out. Larger Shadow Diffusion parameters result in softer edges for the shadow; increasing the space between the layer casting the shadow and the layer receiving it also increases the shadow softness, as the rays get more spread out over distance. The Shadow Diffusion parameter is grayed out for Parallel lights, as all of their rays by definition come at the same angle.

But Shadow Diffusion is not the only thing that affects the sharpness of shadows – the type of rendering engine also plays a big role. Shadows are calculated differently for the old (and now discontinued) Standard 3D and newer (and now default)Advanced 3D Rendering Plug-in. Which to use was selected in the Composition Settings dialog, under the Advanced Tab; the default was the last one you chose. (In newer versions of After Effects, there is an OpenGL rendering plug-in; it can have poor quality shadows depending on how advanced your video card is.)

If you choose the Advanced 3D engine (which is now the default), click on the Options button and familiarize yourself with Shadow Map Resolution, which controls how sharp shadows are rendered. Larger Shadow Maps result in sharper shadows, but take longer to render. Small Shadow Maps render faster, but in extreme cases can look like an image that’s been scaled up beyond 100%, with the resulting aliasing artifacts. The default for Shadow Map is Comp Size, which tends to be on the small side, with a look somewhat similar to using the old Standard 3D Plug-in.

The old Standard 3D plug-in had some built-in softness to its shadows (above left). The Advanced 3D plug-in uses a different algorithm to calculate shadows. How sharp the resulting shadow is depends on the Shadow Map size, with small maps giving blurry shadows (above) and high sizes giving sharp shadows (left) – with a corresponding impact on render time.

Shadows are one of the biggest rendering hits inside After Effects. Allocate some time during a project to experiment with different Rendering Plug-ins and Shadow Map sizes, to balance off the look you are after versus the rendering time you can tolerate. There is no hard and fast rule on what works best; it depends completely on how your project has been set up. If you were already using Shadow Diffusion to soften the edges of your shadows, play around with setting Shadow Diffusion to zero and using a small Shadow Map size to “blur” the edges – if it looks good enough for your application, it will save you a lot of rendering time.

The Color of Darkness

Quite often, you don’t want your shadows to be 100% dark. Play around with the Shadow Darkness parameter in a light’s Settings to make its shadows more or less dense. Also be aware that adding Ambient lights to a comp can wash out shadows.

Shadows default to being black. Some 3D programs allow you to change the shadow color in the light’s settings, but this is not the case in After Effects. Instead, back in version 5.5 layers gained a Material Option called Light Transmission. It defaults to 0%, which results in a black shadow; as you increase this parameter, the shadow takes on more of the color of the layer casting the shadow.

What if you want the shadow to have a different color than the layer casting the shadow? You can accomplish this by creating two copies of the layer: one for the image, and one to cast the shadow. Set the Cast Shadows option for the layer on top to be Off, and set this option for the duplicate underneath to be Only – this means the bottom layer will only cast a shadow, but is not otherwise rendered. Then change the color of the duplicate layer to be the color you want for the shadow. The result is shown at right.

To make this set-up easier to manage, parent the two layers together to make them easier to move as a group. If two layers are at the same position, the layer on top in the Timeline window should render “in front of” the duplicate underneath, so you don’t have to worry about the original blocking the shadow created by the duplicate – but if are the type that worries anyway, edit the position of the duplicate to be fractionally further away from the light than the original.

In the third installment of this series on 3D lighting in After Effects, we will discuss different approaches to creating gel and gobo effects.

The first installment, which contained an overview plus an important discussion on Material Options, can be found here.

LightingMotion GraphicsVisual Effects

(Page 2 of 2 pages for this article  <  1 2)



Gobos and Gels

Chris and Trish Meyer | 11/05- 05:52 PM

Expressive Animation

Chris and Trish Meyer | 07/08- 10:12 PM

Parenting Skills

Chris and Trish Meyer | 06/04- 08:43 PM



Name:

Email:

Location:

URL:

Smileys

Remember my personal information

Notify me of follow-up comments?

Submit the word you see below:




Advertisements
















Copyright 2008 ProVideo Coalition LLC