Mattes In After Effects

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey it's Jake and today I'm gonna be talking about mats in After Effects and we're gonna cover all different kinds of mats what they are how they work and what types of scenarios each one is gonna be useful for let's get started you might already be familiar with track mats but the concept behind what they actually are what the different terms mean might be a little bit confusing and that's because the terms used to describe these different types of mats don't make a lot of sense on their own so I'm going to walk you through all of the different types of track mats and After Effects and kind of demystify this whole process for you so I have this background pattern animation which I'm borrowing from one of my Skillshare classes and I've got some text on top of it so I want to try and contain the pattern within the text to do that I'll be using a track mat and to find your track mats you're gonna need to come to this column right here you don't see this column probably don't have this switch enabled make sure that you have that turned on and you'll have a track map column you still don't see it then right-click go to columns and say modes that will enable or disable that column so there you go track mats now the way that a track mat actually works in After Effects is through a relationship between two layers and those two layers will be right on top of each other so let's start with the pattern layer and the track mats text layer the track mat that you set it to will pull its information from the layer directly above it so in this case the text layer underneath the track mat menu we have four options alpha mat alpha inverted mat luma matte and luma inverted mat and we'll walk through each one of these I want to select alpha mat and you see that it puts track mats that's the name of the layer above it right there after it so you know this is the layer it's gonna be pulling from I'll click that and immediately the text is now filled with that pattern the pattern is no longer filling up the screen it's only fitting into that text and that's because we set it to an alpha mat and that means that it is basing this mat off of the Alpha channel of this layer and if you're not familiar with what an alpha channel is it's literally the opacity of the layer above it so whatever pixels this layer is generating the Alpha channel values of that layer will be applied to the layer we set the track mat to and I can change the text if I scale it up or change the font everything is going to update because it's based on the Alpha of that layer undo and you'll notice that it also turned to that layer off it's not visible anymore if I turn it back on then it's hiding a layer directly below it so when you add a track mat it's going to automatically hide the layer that's being used as the track mat you'll also notice that we have these two icons indicating that this is a layer receiving the Alpha mat and this is the layer being used as the Alpha mat that little icon kind of looks like a mask and I think this one has kind of like a transparency grid like we would have in the background here and the next option in our list was alpha inverted mat if I click on that then it's gonna use the Alpha Channel basically as a hole-punch it's gonna take the Alpha and invert the mat so that whatever this layer is showing up on will be transparent if I turn off my background you can see that we have transparency there in the background so it's punching a hole into that layer that back to alpha Matt for now and then I'll duplicate this pattern layer because I want to use it on this text as well so duplicate and you'll notice that the alpha mat was preserved and it's using the top layer as an alpha mat but because I duplicated it after-effects doesn't automatically turn off the layer that's directly above it because maybe you wanted to duplicate that mat but the layer that just happens to be above it isn't the one you wanted to use for a track mat so make sure that you go and turn that layers visibility off and now we can see that pattern within it now if I were to reverse this order I'll turn the alpha mat off of the pattern grab the track mat layer put it below the pattern and set it as an alpha mat of the pattern we just get our blue text again and that's because the pattern is the size of my comp she's not paying attention to anything about what's in it it's only looking at the Alpha Channel I turn it back off and scale it down as soon as the edges shrunken in past the edges of that text you see that it's starting to go away and that's because there are transparent pixels on the outside of this layer now so you really need to think about the order of your layers when using track mats and since this is based on the Alpha Channel we could take this a little bit further and say add a venetian blinds effect to my text and then set my completion of like 25 and now I've got these lines I'll change it to be 90 degrees turn the width down now that kind of looks like scanlines but the point is you can adjust the transparency of your mat layer to manipulate the transparency of the layer with the mat applied now we have two other options luma matte and luma inverted matte so for this I'm going to use a different layer for the track mat so let me turn these off I'll get rid of the second copy of the pattern and I'm just going to make a new solid command or ctrl Y and I'll make it black and then another solid and changed this one to be white and all by that same venetian blinds effect to it change the completion 250 and the width I'll turn that up alright so now I have these two bars I'm going to pre compose these command shift C ctrl shift C on a PC and call this luma matte and I'll place that directly above the pattern and point out that this layer is completely solid there is no transparency at all to it but when I go to pattern and I change my track mat to luma matte you see that we have transparency I'll turn off my background and there you go there are holes being punched through this layer based on the Alpha of this luma matte so why is this happening well luma is short for luminosity so instead of looking at the Alpha channel of this layer it's looking at the brightness values of the pixels 100% black gives you zero opacity 100% transparent and 100% white gives you purely opaque 100% opaque no transparency at all but what makes this powerful is that it relates all of the values of gray in between pure black and pure white to a transparency value so I could say add a curves to this layer and remember this is just black and white bars but if I bring up the blacks a little bit now they're not perfectly black and I bring down the whites a little bit now I don't have pure white or pure black I'll turn that matte off again and now you see that I have semi-transparent pixels taking those gray values between pure white and pure black and mapping them to opacity values this is really really beneficial for when you're doing things like texturing if you want to base your opacity of a layer on an actual maybe photo texture and I'll show you what I mean by that it's gonna pull in this plastered texture that I have and rotate it so that it's vertical instead of horizontal and scale it down now this has a bunch of variation in brightness or luminance it has some whiter spots it has some darker spots and I can take that layer and just drag it directly above the pattern layer and it's automatically gonna look at that as my luma matte since that was already set and then I'll just hide that layer and now that texture is being applied to the opacity of the pattern layer again I'll turn my transparency grid on so you can see that they're actually our transparent values through there I turn my background on and make it a bright color like red can really see that coming through so it's ignoring all of the color information of this and purely looking at the brightness values so even though there's a little bit of a green tint to this image it's throwing that out it's only looking at the brightness values of that image and just like Alfa Matt has an Alfa inverted Matt option I can do the same thing for luma matte so if I want this part that's red that's showing through to actually be opaque instead of transparent I'll just switch this to luma inverted matte and now my lair is much more transparent than it was you can see a lot more of the transparency grid there now let's say that I don't like the way that this texture is looking maybe I want it to be a little bit more contrast II not so faded out well again I can apply a curves layer to my texture the layer that's being used as the luma matte and then just give it a contrast curve and now those brightest pixels are brighter those darker pixels are darker and my texture is much more noticeable and again I could just switch this back to luma matte to see a lot more of my pattern and I can even grab this layer and just move it around I can reposition it however I want and the matte is going to update with it so these are very very powerful tools to understand and know how to use they come in handy for things like texture or just containing certain elements within the shape of another one but those are not the only matte tools that you have at your disposal inside of After Effects let me disable this luma matte and I'll actually turn off the pattern turn my text back on and let's say I want to apply that same texture to these text layers well I could you know do the same thing set these to luma matte and duplicate this layer set it to a loom matte as well and there's my texture but it's not really showing up on this one so I might need to move it around but let's say I wanted to line up with this one well then I'll have to move it around until I'm happy with the spot it's just a little bit difficult to deal with well there's actually an effect we can use inside of After Effects that can make this process a little bit easier and use less layers so let me delete this one and I'll set this one back to no track matte and I'll just set the rotation back down to zero get rid of that curves and Center this up on the screen and I'll fit it to the width by pressing command option shift H and just send it all the way down to the background I don't even need to see it and I'll apply an effect to this text layer called set mat now I need to tell this effect where to pull the mat from take mat from layer and it's just set to the text layer I want to go down to plaster white dirty that's the texture layer I'll click on that and nothing happens and that's because the use format is set to alpha channel there is no transparency to this layer so that's why nothing has changed however I want to change this from the Alpha channel to the luminance now I have that texture showing through and if I apply this curves layer again to that texture and increase the contrast nothing's happening and that's because I need to enable one more feature under take mat from layer there's a second drop-down that says source I can change this from source to effects and masks and that's going to take into account both the effects I apply to that layer and the masks that are applied to that layer otherwise it's just looking at the image with no effects applied so I'll do that and now my texture has more contrast to it I can invert the mat right here that's the same as saying the luma inverted matte under the track mats stretch mat to fit is going to modify the texture to fit the layer and because this is a text layer it's a vector this effect is actually looking that at the layer as if it was the size of the comp so this is effectively taking the texture layer and then saying transform fit to comp so that's why you can see that texture is showing up a little bit distorted it's not preserving the aspect ratio if you need to preserve that aspect ratio uncheck stretch mat to fit now if I grab this texture layer which we can't see it that's fine and move it around nothing is happening that is one downside to this effect is that you can't do things like rotate the layer and have it actually affect the mat on the set mat effect but if we add another effect to that texture called transform it gives me all the same transform controls that a layer would normally have but as an effect so now I can rotate the texture and because we have the effects and masks selected that is now affecting the actual mat so I can do things like rotate it scale it up or down and reposition it however I want until I'm happy with it and if I like the way that that looks then I can just copy this set Matt and paste it onto the other text layer that's a very very powerful effect to be able to apply textures or just base layers alpha channels on a single source layer instead of having to have multiple copies of the same matte layer another way of using layers as mattes is through this little switch right here it has a T on it and what it stands for is preserve underlying transparency so I'm actually gonna turn off my background layer turn my pattern back on and move it above the text layers and I don't need these plaster layers or that luma matte anymore and I'll get rid of the luma matte there we go okay so underneath this pattern layer is just two text layers there's transparency all around it nothing else in it with this layer above those layers if I click this little switch that pattern is now pulling the Alpha channel from the layers below it I'll turn off my transparency grid so you can see we're getting that exact same effect as we did in the first example because it's preserving the underlying transparency so all of the opacity values that are below this layer in the layer stack have their alpha channels eing applied to that pattern if I move it below the what's the deal with then it's not taking any information off of that layer just the layers below it now this one is a much more specific case generally it only would work in a pre compa because if you have a background layer then it's gonna pull that alpha channel into it as well but it is very worth knowing about I'll turn that off and move the pattern back down below the text one more time and then there's one final method for using mats in after-effects that I think you should know about and it's actually a blending mode at two actually a couple of blending modes so if I go to this menu we have stencil alpha stencil luma silhouette alpha and silhouette luma and I can never remember which one of these is which but they correlate to alpha matte alpha inverted matte luma matte and luma inverted matte so if we set this to stencil alpha we're back to having the pattern contained just within that layer so stencil alpha is going to use this layer as an alpha matte for all of the layers below it even if I turn on the background nothing's gonna change because anything outside of that layer is going to go transparent I turn the pattern off there we see the background color through it but it's not affecting this text layer and that's because it's above it I move it up it goes away because that text is outside of this text layers alpha matte if I change it to silhouette alpha then it's gonna punch a hole through anything below it there we have our transparent pixels again it's not affecting this text layer because it's not overlapping it if I bring that text layer down it disappears that's another very powerful way to use a layer as a type of matte and you can do the same thing with the luma again stencil luma will use the layers luminance value to assign a transparency value to all the layers below it and because it's blue it's looking at the brightness value which is 94% so it's technically applying a 94% opacity to that layer if we set it to silhouette luma then we're gonna get the opposite so it should be around 6% transparent now and this would probably look a little bit better if I pulled out my plaster image and set that to be silhouette alpha and then added some contrast to it oh and actually not silhouette alpha silhouette luma and then add it in some contrast and now we're getting that texture maybe I should have used stencil luma instead of silhouette again I told you I never remember which one is which and I feel like I always choose the opposite of what I actually want but there you go now we have this layers luminosity controlling the Alpha of the entire comp with a blending mode mats are an awesome tool to know how to use inside of After Effects but it's also really good to know all of your different options when it comes to mattes that way you can approach your specific problem from the angle that's gonna produce the best results alright that's all for this tutorial I hope that you liked it thank you for watching and I'll see you in the next one it must hug
Info
Channel: Jake In Motion
Views: 75,031
Rating: 4.9612007 out of 5
Keywords: After Effects, Animation, Motion Graphics, Mograph, Motion Design, Tutorial, Adobe, Adobe After Effects
Id: Y6w7qk_zC7Q
Channel Id: undefined
Length: 17min 25sec (1045 seconds)
Published: Mon Mar 19 2018
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.