EFX (Hybrid Animation-Integrating 2D and 3D Assets) Part 8

SHADOWS

We’ll use the same technique of creating a 3D shadow in Maya and compositing it in After Effects.

To create a shadow matte in your 3D package, you’ll need to be able to render a shadow pass. In Maya 2008 or earlier versions, you can use render passes. In Maya 2009, the company changed how you create render passes. We’ll show both methods. The concepts are the same, only the buttons are different.

We’ll continue using our Jaguar McGuire shot. The first step is to set up a light that will be used to cast the shadow. This does not necessarily have to be exactly the same as the light used in the main render. Remember, your goal is to create a shadow that ties the 2D and 3D elements together. In this shot we have a 3D head that will cast the shadow for the 2D head layer.

Before kicking off a full render, it would be prudent to do a few test renders just to make sure the shadows are going to be to your liking. For instance, in our shot the character’s right ear was not used in the 2D animation, so it needs to be hidden. Of course, you won’t see that in the following image because the author did not follow her own advice and kicked off a render without checking, resulting in the need to re-render the images.

Spotlight added to the room to cast a shadow.


FIGURE 6.50 Spotlight added to the room to cast a shadow.

View of character though the camera.

FIGURE 6.51 View of character though the camera.

To create a shadow layer, you should isolate only the objects that are casting or receiving the shadow as well as the light that is casting the shadows. Figures 6.52 and 6.53 show the room before a render layer is created. Create a layer by selecting Render (layer)> Layers > Create Layer from selected. Remember that when a render layer is selected, as you see in Figure 6.53, only those objects are visible.

Before you go on, is your light set to cast shadows? Make sure the light that you have included in your render layer is indeed casting shadows. Not that the author has ever made that mistake before. What gave you that idea?

Creating a render layer.

FIGURE 6.52 Creating a render layer.

Render layer shows only what is in the layer.

FIGURE 6.53 Render layer shows only what is in the layer.

 Spotlight is set to cast depth map shadows.

FIGURE 6.54 Spotlight is set to cast depth map shadows.

To create a shadow render pass, right-click on the render layer and select Preset > Shadow. You will see that the render layer’s second button turns red (Figure 6.55). This render layer does not include parts of Jaguar McGuire, in order to simplify the cast shadow.

Render layer shadow pass created.

FIGURE 6.55 Render layer shadow pass created.

Render as normal. For a shadow pass the render is not creating an RGB image, it is only creating an alpha channel. This is different than what we have done before where we actually used the RGB created by the toon shader as a matte. This time we are using a true shadow matte. It can be slightly disconcerting the first time an artist opens the shadow matte and sees nothing in the RGB channels. Do not panic. Look in the alpha channel.

Alpha channel of a shadow pass.

FIGURE 6.56 Alpha channel of a shadow pass.

CREATING A SHADOW PASS IN MAYA 2009+

A few features were added in Maya 2009 to add more functionality to render passes. At first testing, I couldn’t figure it out without finally giving in and reading the documentation. I used what was there to figure out how it really worked. Here’s a quickie overview of using render passes in Maya 2009+.

The previous steps will work if you have Mental Ray selected as your renderer. You must select Mental Ray as your renderer in order for the list of passes to show up. I was unable to include a screen grab of the passes: there are plenty of them to choose from.

1.    Select your object and in the Render Pass window and select Render (layer) > Layers > Create Layer from Selected, as we did previously.

2.    Choose Mental Ray as your renderer in the Render Settings Window.

3.    Right-click on the render layer and click Add New Render Pass. Select the desired render pass from the large list presented.

4.    If you look at the Passes tab in the Render Settings Window, you will see your render layer listed there.

5.    Render as normal and wonder where your render layer is.

6.    In the render window, select File > Load Render Pass. This will open your render layer.

Read the documentation for more information, including movies on how to use the new implementation of render passes.

Render layers in Maya 2009.

FIGURE 6.57 Render layers in Maya 2009.

Next post:

Previous post: