Camera: Flat, Limited, and Deep Space (Hybrid Animation-Integrating 2D and 3D Assets) Part 5

Using a compositing system’s 3D camera

Shake, Nuke, After Effects, Toon Boom, and many proprietary software packages that I have worked on have implemented some type of 3D camera that figures out the depth of the artwork in relationship to the camera when either is moved. Most of the systems I have seen have been extremely similar. The only difference in the proprietary software packages that does not show up in off-the-shelf software is the capability to set the artwork scale relationship so that when a piece of artwork is moved back in depth, it automatically scales to visibly stay in the same scale relationship to the other drawings. I’ll bet we could come up with an After Effects expression to do that. That can be something for the website. Last one to post is a rotten egg.

Our first example uses a normal 3D camera for multiplane setups in After Effects. In version CS3 of After Effects or later, you are able to bring in Photoshop files and maintain the layers. This is an extremely useful feature. Of course, if your production pipeline needs .tif files or tga, you can still use those individually. Using a psd file allows us to create the levels in Photoshop, see the relationship of the layers in their composition, and save them all in one file for safe transportation. It is up to you what your pipeline needs. For this example, our Photoshop file is a static image. There is no animation in these files.

As an aside, this is only one method for working on projects that use both After Effects and Photoshop, and as you have noticed, this text is not the end-all-be-all text on how to click every single button in these software packages. After Effects, Shake, Nuke, Photoshop, Illustrator, Flash, Corel Draw, Toon Boom, and any other packages we might have touched on are huge software packages. With hope, this text has been a great “getting your toes wet” opportunity, and you will be fearless in picking up some great texts that explore the packages in depth. There are even some great concepts in the help documentation, and if you read the documentation you will note that Adobe has some wonderful online video tutorials as well. How’s that for information when you need it? For example, here is a great video to watch for more information on using Photoshop and After Effects together:


www.adobe.com/go/vid0252. This link can be found in the help documentation along with many others.

Follow these steps to create a multiplane shot in After Effects:

1.    Click File > Import File (or double-click in the project tab).

2.    In the file browser window, select the Photoshop file sea_100dpi.psd.

3.    Select Import as: Composition—Cropped Layers. The default setting of Editable Layer Styles on is fine.

You might ask, what is the difference between the different import as options? The video link mentioned earlier actually explains it. Footage, you might be familiar with, merges the layers together as one image or you can choose which layer you want to use. We want to use all of the layers, so our choices are Composition or Composition with cropped layers. If you bring in the Photoshop file as composition, it will bring in each layer with the same size as the document. The pivot point will be at the center of the whole image. If you bring in the Photoshop file as composition with cropped layers—you guessed it—the layers are cropped and the pivot point is at the center of the layer itself. All of the layers are still positioned as they were originally created, only their cropped size and pivot point are different.

The layers are brought in and placed nicely in a folder, and a composition is automatically created. That saved many button clicks, didn’t it? Anything that saves a click or two is great! Those clicks and drags add up to precious time saved.

Composition that was automatically created.

FIGURE 7.30 Composition that was automatically created.

4.    Double-click on the composition titled sea_100dpi to see the layers together.

5.    To help remember what layer is what, take a moment to rename the layers in the composition. Click on the layer so that it highlights, and hit Enter on the keyboard to rename the layers.

6.    To place these layers in depth, we will need to turn on the 3D icon.

7.    Right-click in the Composition tab and select New > Camera. For this hands-on project, we will use the default camera. Feel free to experiment on your own for the topic assignment. Click OK in the camera options window. You will notice that a camera has been added to your composition. It doesn’t matter where it is in the timeline.

8.    To make it easier to see what your camera is seeing and where the artwork is in front of the camera, change your viewport to have two views. Have the left view show a top orthographic view by clicking once in the left port, making it the active port (you will see yellow triangles at each corner), and then change the view drop-down to be top. Have the right view show what the camera is seeing by clicking once in the right port, making it the active port, and change the view drop-down to be Camera 1. See Figure 7.31 for an example.

Setting up a two-view panel with top and Camera 1 views.

FIGURE 7.31 Setting up a two-view panel with top and Camera 1 views.

You can reposition the image in the viewports by using the space bar and click (pan) or zooming in and out with the mouse’s middle roller ball (should you have one) or using the hotkey z (zoom in) alt + z (zoom out).

Next, you will want to position the artwork in front of the camera.

We have turned each layer onto a 3D layer. This has added another dimension to the transform attributes. We can now simply move them back in Z-depth:

1.    Select each layer, and locate the Position attributes. (You can show just the position attributes with the hotkey p.) Start by moving the bg layer back in Z away from the camera. You can drag on the Z attribute with your mouse button or in the preview window click and drag on the Z translate manipulator.

You will notice that the background layer looks smaller now that it is moved back in space. Perhaps on the website we’ll have a special trick on how to put in an expression to hook up scale to the z position so that it automatically scales. For now, follow this step.

2.    Scale the bg layer so that it matches visually the size of the other layers when viewed through the Camera 1. You can show just the scaling attributes with the hotkey s. In our example, the bg image was moved back to about 4000 in Z, and the scale was adjusted to 200.

3.    Repeat for the next layer. The Reeds layer, for example, has been moved in Z to 3500 and scaled to 190.You’ll note that the position and scale attributes are the only attributes visible. You can achieve this effect by using the hotkey p and then holding down shift and then the hotkey s to show the position attribute; then add the scale attribute. Thank you, Professor Burge, for your wonderful demonstrations of After Effects and this and many of the tips you see in this topic.

4.    Repeat for all of the layers. See Figure 7.32 for an example. You’ll note that the way things are placed in the timeline has no correlation as to what is in front or behind another object in Z position. In fact, the boat and TopWave are at the bottom of the timeline yet closest to the camera in Z.

5.    Make sure that you are on the first frame of the timeline and adjust the camera’s zoom to get the opening view of the underwater stage.

All levels moved in Z. The boat and TopWave are the closest to the camera.

FIGURE 7.32 All levels moved in Z. The boat and TopWave are the closest to the camera.

After all of that, you are ready to set two keyframes to see the parallax magic. We’ll move the camera up to reveal the boat. When you view the playback, you should be able to see the parallax between the layers. The closer the layers are to the camera, the faster they will move across the screen. The farther away the backgrounds, the more parallax (different rates of movement) you will have.

1.    On frame 1, create a keyframe for the position and the point of interest for the camera by clicking on the stopwatch icon. If you only set a keyframe for the position, the camera will move up but pivot down to continue to look at the center of the images.

2.    On the last frame, move the camera position and point of interest up in Y so that the boat is visible. A keyframe will automatically set.

Press play to play back a preview and notice the different rates of movement. Some touchups can still be done. You’ll notice that the background layer is visible when you don’t want it to be. Do not be afraid to move the artwork to exaggerate the parallax and use traveling garbage mattes to hide unwanted levels.

For the background and reed layers, we will add a mask to hide these levels when the camera moves above the sea level. For both levels, the same steps will go as follows:

1.    Right-click on the Reed or BG level and select Mask > New Mask.

2.    Under the image in the timeline there is now a Mask parameters area. Open this area, change the setting to subtract, and click on the stopwatch icon for Mask Path. This will allow us to animate the matte.

3.    Make sure you have the selection tool active (or use the v hotkey). Go to frames midway through the camera move and at the end. It might be best to start at the end and work backward. Adjust the matte as needed to hide the reeds or background. Keyframes will automatically be set. In Figure 7.33, three keyframes were set to adjust the matte during the camera pan.

Moving the mask to hide the reeds and background levels during the camera movement.

FIGURE 7.33 Moving the mask to hide the reeds and background levels during the camera movement.

4. To further tweak the animation, you can move/slide the image layers to get more parallax or a better composition. In Figure 7.34, a few keyframes were added to the position of the Front wave and TopWave images.

Take Note

You will note that the image size is very large. When exporting out movie files, it is important to watch your file size so that you maintain a good playback speed. In this topic we have learned that the compression setting animation is not actually a compression at all. It is all of the frames in their full res state packed into one movie file. You will not receive a good playback rate with this. As an example, I have exported a movie file from this exercise. You will note that with a Sorenson 3 compression, this 2400 x 2000 pixel movie is only 3 MB.

 Keyframes can be added to the artwork levels themselves to increase parallax or obtain a better composition.

FIGURE 7.34 Keyframes can be added to the artwork levels themselves to increase parallax or obtain a better composition.

Next post:

Previous post: