I'm doing a small project where I'm rotoscoping (really basic - using the paintbrush to draw over a video frame by frame). I've been trying to put a moving pattern inside the shape of someones face kind of like what happens at 33 seconds in this video:
A Track matte is where you have a layer used the layer above it to determine what part of the layer will show through.
Create a solid and add the effect Generate ->4-color gradient effect to it. Now add use the text tool and make any text, make the text the top layer. Now use the TrkMat pulldown and choose Alpha Matte(if you don't see the track matte pulldown, press F4 or right click in your timeline and go to Columns -> Modes). Your solid layer will now use the alpha channel of the text and only show up there. If you choose alpha inverted, where there is text the gradient won't show up.
You also have luma and luma inverted. This check the lightness of the level above and uses those pixels for to show what will show and won't show. So add a the effect Generate -> Gradient to your text and choose the luma track mattes. Now your gradient layer should gradually fall off as the layer goes from white(bright) to dark(black).
"I have not failed 700 times. I have succeeded in proving that those 700 ways will not work. When I have eliminated the ways that will not work, I will find the way that will work."
---THOMAS EDISON on inventing the light bulb.