Exploring mask interpolation
Video: Exploring mask interpolationAs 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.
Viewers: in countries Watching now:
In this course, Chris Meyer demonstrates the most common techniques for adding selective transparency to layers in After Effects through the use of masks, track mattes, and stencils. In addition to explaining the tools and basic theory behind transparency, the course covers several practical applications for these techniques, including isolating objects, creating vignettes, and filling text with visual texture. Tutorials on crafting custom transitions and other treatments are also included. Exercise files accompany the course.
The After Effects Apprentice videos on lynda.com were created by Trish and Chris Meyer and are designed to be used on their own and as a companion to their book After Effects Apprentice. We are honored to host these tutorials in the lynda.com Online Training Library®.
- Creating masks using parametric shapes or freeform with the Pen tool
- Editing and animating masks
- Combining multiple masks
- Using one layer to define the transparency of others
- Explaining the interaction between effects, masks, and mattes
- Mastering mask animation
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.
Find answers to the most frequently asked questions about After Effects Apprentice 05: Creating Transparency .
Here are the FAQs that matched your search "" :
- Q: This course was updated on 11/15/2012. What changed?
- A: We added a movie that shows our premium subscribers how to use the exercise files, We have also added new sets of exercise files designed for After Effects CS5.5 and After Effects CS6.
Sorry, there are no matches for your search "" —to search again, type in another word or phrase and click search.