Copy link to clipboard
Copied
Allow me to explain what I'm asking.
My end goal is a MOGRT that is easily customizable for others to use. For simplicity sake, lets say this MOGRT has five layers, one is a textured background, one has a media element, and one is a semi-transparent overlay. I also have two layers that contain shapes on them that I am using to mask each of the overlay and the media element layers over the background.
Where I am having issue is that, in order to add more variety and usefulness to this MOGRT I've created new mask (tracking matte) layers with different shapes to them. Lets say the first mask shape was a triangle this new shape might be an oval.
I'd like to set up a dropdown in my MOGRT that lets me swap which of the mask shapes are being used on the two layers that I need to mask.
Is this possible to do with an expression? If not, does anybody have any ideas of an alternate solution to achieve this effect? My actual file is a bit more complex than what I've described, but the gist of it is the same.
Thank you for your time.
Copy link to clipboard
Copied
Couldn't you have the shapes in a precomp, use the precomp as the track matte, and use experssions to control the opacity of the individual shapes?
Copy link to clipboard
Copied
I do exactly what Dan is talking about. I don't even pre-compose the shape layers. I've set a dropdown menu controller and just written simple if(ctrl == 1) 100 else 0 for the fill opacity of the shape layers. I just name them in the Extended Graphics panel and assign the numbers in the Fill/Opacity expression. That's all there is to it.
Something like this:
sel = effect("Selet Matte")("Menu");
if (sel == 1)
100;
else
0;
Change the equals value to match the number of the Opacity property, and you get this:
I've even created linear interpolation methods that fade in and out of various track mattes and even shape layer backgrounds based on the time minus inPoint and time minus outPoint of a layer.
Copy link to clipboard
Copied
Dan and Rick are right... but just in case you were wanting to expand your question to layers where you might want to use more than a simple shape, then you can use the Set Matte effect for each of the selectable layers. In the effect's Compositing Options, you can apply an expression on each, much like Rick's. Using two Set Mattes here would give you options like including a smoke video or similar.