New Feature: Playlist Center! Pick a topic and let our playlists guide the way.

Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member

Exploring mask interpolation

From: After Effects Apprentice 05: Creating Transparency

Video: Exploring mask interpolation

As you might have noticed earlier in this lesson, sometimes mask shapes don't always do what you want to them to do as they interpolate from one shape to another. Well there is an advanced tool in After Effects called Mask Interpolation, which can help solve some problems. If you have the Exercise Files that came with this lesson, open up Mask Interpolation sidebar.aep. This subject is also covered in our more exhaustive book, Creating Motion Graphics, at the end of the chapter all about masking. Here I've got a few shapes of a champagne bottle that I want to morph to a martini glass.

Exploring mask interpolation

As you might have noticed earlier in this lesson, sometimes mask shapes don't always do what you want to them to do as they interpolate from one shape to another. Well there is an advanced tool in After Effects called Mask Interpolation, which can help solve some problems. If you have the Exercise Files that came with this lesson, open up Mask Interpolation sidebar.aep. This subject is also covered in our more exhaustive book, Creating Motion Graphics, at the end of the chapter all about masking. Here I've got a few shapes of a champagne bottle that I want to morph to a martini glass.

Unfortunately, as you can see, some very funky things happened during the middle of this mask interpolation. Well, as you learned already, the first thing to check for is that first vertex. I'll select the mask path. Look for the biggest out of all. That's the first vertex. Go to my next keyframe. Use my handy Keyframe Navigator and I see my first vertex is indeed still done here at the bottom. So that's not my problem. The problem is just these points or vertices of the mask are just so different between these two shapes.

They don't interpolate cleanly on their own. Well to help tackle this I am going to open up Window > Mask Interpolation. I am going to move it over closer to where I am working so I can see its parameters right next to my Composition panel. And let's just try it out. I want to go ahead and select the Mask Path keyframes for another one of these bottles. Note that if you font has two or more Mask Path keyframes selected you will get an error when you try to apply Mask Interpolation. So make sure you've got those keyframes selected, then apply Mask Interpolation.

You'll see it immediately creates a large number of keyframes. These basically force the mask path to follow a different interpolation than they normally would by stepping them through frame by frame. Your first and last keyframes are the same, but as soon as you go one frame off, you'll see the Mask Interpolation has added a lot of additional mask vertices around these shapes. Now go back to the start, step one frame or one keyframe later, and you'll see all these different points.

Let's press zero on the numeric keypad to RAM Preview this. You'll see how much better of an interpolation that is and I just used the default settings. Much better than this oddly melting glass off to the left. So this is one case where Mask Interpolation really helps. As you might have noticed, Mask Interpolation has a lot of additional parameters you can tweak to further refine what you might see. I am going to park my Current Time Indicator in the middle of my comp, so I can see this interpolation midstream and I'll select a third copy of the shape to play around with.

I've even named them to keep them straight. The red one is just normal Mask Interpolation, green uses the default settings of Mask Interpolation, and here with the blue shape we are going to try some variations. I'll select the Mask Path keyframes and start exploring these parameters. Now Keyframe Rate is basically how often you want keyframes to be spaced. The default is to do it as fast as the composition. If you find this is just way too many keyframes to handle or if you want to try a stranger more roughly interpolated look, you might want to go ahead and reduce this to a lower frame rate.

If you have field rendered material and in particular if you intend to interlace your final output when you render, you definitely want to enable Keyframe Fields. Otherwise, these first and last keyframes will have a jump between them and your initial mask shape keyframes you'd set up. Since this is not going to be field rendered, I'll turn that off. I'll select my Mask Path keyframes again. Use Linear Vertex Path says as you go from one shape to another interpolate all those new points in straight lines.

Quite often this works very well. However, if your two different mask shapes have say a bit of rotation to them or you otherwise want your vertices to follow curved paths rather than straight paths, you can turn this off. It does have an interesting side effect though. When you apply it, it can make shapes appear to grow in the middle of their animations. Go ahead and RAM Preview again. So you see I get a pretty good interpolation here, but it actually grows in the middle of this interpolation. So this is a side effect of disabling Use Linear Vertices.

I'll stop, go back to one second, undo, and turn that back on. Bending Resistance is basically how fluid you want this interpolation to be. Do you want it to be a very soft or morphy shape or do you want it to be a more rigid shape? If you take this all the way down to zero, you are going to get a more blobby sort of interpolation. RAM Preview. It's actually very similar to the default setting in the case of this shape. I'll undo. However, if you go to the other extreme of 100% and apply that, you will see some very strange things happen.

The glass is actually kind of inverting the mask shape and growing out of the center. It is just the result of way too stiff of interpolation. One thing to keep in mind with this parameter is that a hundred actually behaves a lot differently than 99 does. So I wouldn't go to the extreme. I'd back off a little bit to 99 to see if that stiffness of interpolation gives you more what you want. Now you can really see side by side the default of the 50% stiffness for Bending Resistance and 99%. 50 is a bit more fluid. This one is a bit more rigid with what it's doing with the bottle. It isn't giving me in this case exactly what I want, but it's a variation to keep in mind.

I'll undo and go back to 50. Quality frankly has very little effect on the outcome. It takes longer to process at higher settings but now computers are so fast, they are cranking this up. It really doesn't hurt you that much timewise. So I will apply it. You see that happen pretty fast. I'll preview and you see that I have maybe just a touch more smoothness but not a big variation. So Quality is not a parameter you need to worry about. The way that Mask Interpolation adds its magic is that it adds mask path vertices.

It creates a lot more mask vertices around the shape to control how this thing is going to interpolate. By default, it places them every nine pixels. However, you have control over how fine this is. I'll undo to get back top where I am. I can say place the a vertice every pixel, the maximum. Go ahead and click Apply, takes a while to calculate, ton of vertices now. But now when I RAM Preview, you'll see that I have a much smoother shape along the top of this particular interpolation.

So increasing the number of vertices does give you quite often smoother, better mask shape interpolations. I'll undo. There are several different ways of defining this parameter. You can define it by the Total Vertices in an object, if you don't want to go crazy and have millions of them. Percentage Of Outlines, say every 1% or 0.5% of the outline. But quite often I'll just go ahead and use this default of how many pixels in between vertices. Matching method is another parameter you have control over. I actually find that Auto works pretty well.

After Effects will look at the shapes and decide what algorithm to use. It does have a couple of variations though. Curve is better for organic shapes and frankly you call this a more organic shape as we go to that wine glass. It's not very mechanical. I'll exclusively select Curve, click Apply, and you'll see the results are the same as the one that After Effects chose all on its own using the Auto setting. I'll undo and go to Polyline. Polyline is better when you are trying to do much more rigid body shapes, something that's more mechanical and stiff.

I'll apply that. You see now we've got this bend at the top of the glass that we had earlier. It's a different type of morph and different type of variation. Maybe what you are looking for. It's something to keep in mind. Undo, back to Auto. Use 1:1 Vertex Matches is the next parameter. Frankly, you almost never want to turn this on. Particularly if you have a different number of points in your first and last keyframes or they are just simply in different places. Turning this on forces After Effects to match up these vertices and the result is not always pretty, as you can see here.

It's forcing itself to match up vertices from the first and last shape and this is a case it's better off letting After Effects decide what's best. Finally, the First Vertices Match. You should be setting the first vertex point for your first and last or any intermediate mask shapes just to make sure your interpolations are smooth, whether or not you're using Mask Interpolation. However, if you forgot to or for whatever other reason, you can turn this off and let After Effects attempt it to guess which would be the best vertices to match up.

Now unlike 1:1 Vertex Matches, this is a case where After Effects does not do a good job all on its own. I'll click Apply and you'll see I've got the most twisted shape you can imagine. It's completely screwed up where the first vertices are supposed to be. So, in review, I'll leave First Vertices on. I'll Use 1:1 Vertex Matches off. Matching Method of Auto works quite well most of the time. Although you can experiment to get different looks. I quite often will decrease the number of Pixels Between Vertices to create more vertices around the shape.

A little bit of Quality helps up a little bit. Bending Resistance is difference between our organic interpolations or very rigid interpolations. Again, Use Linear Vertex Paths is another option to choose whether or not you want it to be more organic and smooth and curved or more linear and rigid, although this can cause a shape to grow in between keyframes. And finally, if you are field rendering turn on Keyframe Fields. Now Mask Interpolation is not the magic cure for everything. Let's go back to something I was playing with earlier. You may remember these leaves that we had earlier and even though we matched up the first vertices, the interpolation isn't so great.

So I am going to select the one on the right, click on Mask Path, and apply Mask Interpolation. RAM Preview. The one on the left is the default, the one on the right is Mask Interpolation, and it's hard to say that this is really an improvement. You can go ahead and play around with all these different parameters I just showed you. You might get it better. But in this case, I could not get this shape to be better unless I did what I showed you earlier in this lesson: just add additional vertices around the outline of shape to try to balance the left and right halves so you have the same number of vertices morph into each other.

Sometimes you do need use manual labor, but you do have this tool to help you in other cases.

Show transcript

This video is part of

Image for After Effects Apprentice 05: Creating Transparency
After Effects Apprentice 05: Creating Transparency

38 video lessons · 12629 viewers

Chris Meyer and Trish Meyer
Author

 
Expand all | Collapse all
  1. 3m 17s
    1. Overview
      1m 17s
    2. Using the exercise files
      2m 0s
  2. 28m 53s
    1. Creating basic mask shapes
      5m 7s
    2. Using advanced parametric shapes
      3m 35s
    3. Basic mask shape editing
      4m 35s
    4. Masking in the Layer panel
      1m 55s
    5. Working with mask parameters
      4m 0s
    6. Animating masks
      5m 52s
    7. Creating vignettes
      3m 49s
  3. 25m 56s
    1. Masking with the Pen tool
      6m 44s
    2. Editing a mask path
      6m 19s
    3. Using RotoBezier masks
      4m 32s
    4. Targeting masks for animation
      3m 13s
    5. Setting the first vertex point
      5m 8s
  4. 19m 7s
    1. The basics of variable-mask feathering
      7m 33s
    2. Exploring variable-mask feathering options
      5m 56s
    3. Exploring visual effects applications
      5m 38s
  5. 7m 55s
    1. Exploring mask modes
      3m 58s
    2. Fading mask opacity
      3m 57s
  6. 11m 48s
    1. Using targeted treatments
      2m 35s
    2. Filling mask shapes
      3m 8s
    3. Following mask paths
      6m 5s
  7. 13m 31s
    1. Using alpha mattes
      3m 48s
    2. Grouping track matte pairs
      3m 40s
    3. Working with luma mattes
      3m 52s
    4. Animating mattes
      2m 11s
  8. 10m 0s
    1. Using Stencil Luma
      3m 5s
    2. Using Stencil Alpha
      2m 5s
    3. Using effects with stencils
      2m 20s
    4. Stacking stencils
      2m 30s
  9. 8m 23s
    1. Quizzler challenges
      1m 18s
    2. Quizzler solution one: One word at a time
      3m 53s
    3. Quizzler solution two: Stroke drawing direction
      3m 12s
  10. 11m 18s
    1. Idea corner one: More masks and effects
      2m 50s
    2. Idea corner two: Transition effects
      3m 44s
    3. Idea corner three: Sequenced layers as mattes
      4m 44s
  11. 16m 29s
    1. Understanding track matte rendering order
      5m 48s
    2. Exploring mask interpolation
      10m 41s

Start learning today

Get unlimited access to all courses for just $25/month.

Become a member
Sometimes @lynda teaches me how to use a program and sometimes Lynda.com changes my life forever. @JosefShutter
@lynda lynda.com is an absolute life saver when it comes to learning todays software. Definitely recommend it! #higherlearning @Michael_Caraway
@lynda The best thing online! Your database of courses is great! To the mark and very helpful. Thanks! @ru22more
Got to create something yesterday I never thought I could do. #thanks @lynda @Ngventurella
I really do love @lynda as a learning platform. Never stop learning and developing, it’s probably our greatest gift as a species! @soundslikedavid
@lynda just subscribed to lynda.com all I can say its brilliant join now trust me @ButchSamurai
@lynda is an awesome resource. The membership is priceless if you take advantage of it. @diabetic_techie
One of the best decision I made this year. Buy a 1yr subscription to @lynda @cybercaptive
guys lynda.com (@lynda) is the best. So far I’ve learned Java, principles of OO programming, and now learning about MS project @lucasmitchell
Signed back up to @lynda dot com. I’ve missed it!! Proper geeking out right now! #timetolearn #geek @JayGodbold

Are you sure you want to delete this note?

No

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.