Morphing

Table of contents:

Let's talk about morphingthat's right, that crazy craze of the early '90s. Where are you now, Michael Jackson?

Thing is, morphing can come in handy, without being so blatant and obvious, if you think of it as a concealing tool. It's useful when you don't want anyone to notice a transition between two objects or even a transition between one object and itself at a different point in time. Or heck, go crazy morphing together members of your extended family to see if you look anything like the result.

What exactly is a morph? It is, quite simply, a combination of two warps and a dissolve. Given two images, each with a corresponding shape (say, the features of the face), you warp the source image's face shape to the face shape of the target, warp the target from something that matches the source to its face shape, fading the target in over the source.

After Effects has no tool called "Morph," and for a long time, the program offered no good way to pull off this effect. After Effects Professional includes Reshape, a warping tool that lays the groundwork for simple morphs. You can build these up into more complex morphs, with separate individual transitions occurring to create an overall transition.

Using Reshape to Morph

Unfortunately, creating a morph with Reshape is nowhere near a one-button process. This book generally steers away from step-by-step recipes in favor of helping you solve larger problems creatively, but in this case, it's easy to get confused. So here is a step-by-step, using a demonstration of my own resemblance transitioning to that of my evil twin (Figure 7.14):

1.

Start with two elements that have some basic similarities in their relative position of features. The subtler the distortion required, the more you can get away with.
 

   

2.

Isolate the two elements you will be morphing from their backgrounds to prevent contamination. If you're working with elements shot against a blue screen, key them out first. Otherwise, mask them. In my example, I have created masks for each layer.
 

3.

Ascertain that the two layers are the same size in the X and Y dimensions and as closely aligned as possible. If they are not, precompose one layer to match the other. This step is important because it will make matching the source and target masks much, much simpler. Name the two layers Source and Target (as they are in the example) if it helps you follow along.
 

4.

Choose matching sections from your two clips for the duration of your transition (say, 24 frames). If you have still elements, no worries. The closer your moving elements are to still, the more likely you'll get a clean result.
 

5.

Draw a mask around the boundary that is going to morph in both layers. Be as precise as possible, erring to the inside if at all (Figure 7.15). This could be the masks created in step 2, if you created masks there. It need not be active; if you don't need it to mask out the background, set it to None. Rename each mask something descriptive like outer (the name used in my example).
 

6.

Create a mask around the area of the Source layer that is the focus of the morph. In my example, the focus is facial features: the eyes, nose, and mouth (Figure 7.16). Make this mask as simple as you can; use RotoBeziers and as few points as will work to outline the features in question.
 

7.

Set the mask mode to None; this mask is your first shape, you don't need it to influence the layer at all; you will use it for the Reshape effect only. Give it a name (mine is called "me").
 

8.

Copy this mask shape and paste it in the Target layer. If the two layers are the same dimensions, it should be an identical size and position as it was in the Source layer.
 

   

9.

Duplicate the mask. Give it a different color and rename it. In my case, I called the mask "it."
 

10.

First scale and rotate, then if necessary move individual points (as little as possible!) so that the it mask surrounds the equivalent area of the Target layer that me does of the source: in my example, the eyes, nose, and mouth.
 

Notes

New in version 7.0, mask names are copied along with masks; the copied mask in step 8 remains named "me" in the new layer.

11.

Copy the resulting it mask shape, and paste it to the Source layer to create a new, third mask.
 

12.

You now have three masks for each of the Source and Target layers. Now apply the Reshape effect to each layer.
 

   

13.

Starting with the Source layer, set the Source Mask (me), the Destination Mask (it), and the Boundary Mask (outer). Set Elasticity to Liquid (you can experiment with other settings later if need be). Set Interpolation to Smooth.
 

14.

At the first frame of the morph transition, still in Source, set a keyframe for Percent (at the default, 0.0%, meaning no reshaping is occurring). At the last frame, set Percent to, you guessed it, 100.0%. Now sit back and wait for the gruesome transformation. Don't worry about how it looks yet.
 

15.

Repeat steps 12 and 13 for the Target layer, with the following changes: Set Source Mask to it and Destination Mask to me. The Percent keyframes should be set to 0.0 at the last frame of the transition (where it is keyframed to 100.0 on the Source layer) and, you guessed it, 100.0 at the first frame.
 

16.

You've created the warps, now you just need the cross dissolve. Set an Opacity keyframe for Target at the last frame of the transition (leaving it at the default 100.0%), and then add a 0.0% Opacity keyframe at the first frame.
 

Figure 7.14. Me and my evil twin, and that awkward adolescent phase in between.

Figures 7.15. The outline of each head is carefully masked. These two masks need not correspond to one another; they are defining the boundary for the Reshape effect and can have differing numbers and orders of points. This mask prevents Reshape from pulling bits of background into the morph region.

Figure 7.16. The full setup along with the top layer enabled at 100% and color corrected. It begins the final animation at 0% Opacity, reaching 100% at the end of the transition.

Tip

The Correspondence Points in Reshape can be raised from the default of 1 to make the distortion more precise (and in some cases, less twisted). The downside is that this slow effect thus becomes even slower. Better to simplify what you're attempting to do with your masks and fix things there; raise this value only as a last resort.

You should now be ready to preview. The preview may take a long time to build the first frame; subsequent frames render much more quickly, so be patient. The main question to resolve is whether the features line up properly; if not, you must adjust the source and destination mask shapes accordingly, watching the median frame to see whether the changes are improving matters.

At this point my example may be looking good in terms of the face transition (Figure 7.16), but, of course, I've made life hard on myself by transitioning from a head of one size to a larger one, and the edges just kind of fade in. Thereforeand this is where it can get really complicatedI add a second morph, using the same steps as before, but all new masks.

Tip

If at any point during setup it becomes difficult to interact with the UI because After Effects is taking so long updating a frame, enable Caps Lock on your keyboard to prevent any further frame rendering until you're done.

Why complicated? Why new masks? These two questions are interrelated. If you set a second Reshape effect, the key is to avoid influencing the result of the first Reshape effect at all. Therefore, on the second instance the Boundary mask should be the boundary of the object minus the area occupied by the original source and destination masks. My second set of shapes covers the ears and top of the head, but avoids the area of the previous masks completely (Figure 7.17).

Figure 7.17. The full setup to do more than one morph on a single image quickly becomes pretty gnarly. Here are two non-overlapping holdout areas containing two sets of transition curves. This setup also takes exponentially longer to render.

Notes

Because I know this is complicated, I've included the source project and the final result as projects on the book's DVD-ROM. Please do not use the result as the centerpiece of your horror feature.

Now, a quick look at a detail I left out (by having you duplicate the Source and Destination masks in step 9, for example, rather than draw them from scratch).

First Vertex

The Reshape tool relies on a concept that was touched upon already, but now looms more significant: that of the First Vertex that exists on every mask. Look closely at a mask, and you will notice one vertex that is larger than the rest; that's the First Vertex.

Reshape relies on the First Vertex to determine which point on the source mask corresponds to which on the destination mask. Above, it was easiest to duplicate the source mask to create the destination mask, because this automatically satisfies the two criteria that are essential for a smooth Reshape effect:

  • Placement of the First Vertex corresponds on both masks
  • Each mask has the same number of points

If either of these criteria is not fulfilled, Reshape will execute some not-so-nice compensatory measures, probably deforming the in-between frames in undesirable ways. The easiest solution is usually to duplicate the source mask and edit it, keeping the same number of points. The next easiest method would be to draw a new mask with the same number of points, in the same direction (clockwise or counterclockwise), and to set the First Vertex where you need it (by context-clicking on the mask and choosing Select First Vertex from the menu).

Paint and Cloning

Section I. Working Foundations

The 7.0 Workflow

The Timeline

Selections: The Key to Compositing

Optimizing Your Projects

Section II. Effects Compositing Essentials

Color Correction

Color Keying

Rotoscoping and Paint

Effective Motion Tracking

Virtual Cinematography

Expressions

Film, HDR, and 32 Bit Compositing

Section III. Creative Explorations

Working with Light

Climate: Air, Water, Smoke, Clouds

Pyrotechnics: Fire, Explosions, Energy Phenomena

Learning to See

Index



Adobe After Effects 7. 0 Studio Techniques
Adobe After Effects 7.0 Studio Techniques
ISBN: 0321385527
EAN: 2147483647
Year: 2004
Pages: 157

Flylib.com © 2008-2020.
If you may any questions please contact us: flylib@qtcs.net