Copy link to clipboard
Copied
Hi!
Is there a way to set matte on layer with expression?
Copy link to clipboard
Copied
Pop-ups/ dropdown lists can of course be automated, but how would you even determine which layers to set as the matte? If there is any merit to whatever you are trying to do, you have to explain it much, much better and tell us what it is supposed to do and how you would want it to work.
Mylenium
Copy link to clipboard
Copied
All right, some explanaition is here.
Let I have Comp 1 with tree layers like this.
Then I want to precomp layers Scis 1 and Scis 2 into Scissors comp for further animation. Scissors will clip and Star in Comp 1 will change their points number. Well, do precomp.
Now I have two nested comps: and Scissors and Comp 1.
Obviously I have to set matte to layer 'Scissors.Scis 1'. How I can do that? Maybe using Set Matte effect. But this effect give a choice any layers from Scissors comp however I need 'Comp 1.Star' matte.
So, is there a way to set matte on layer with expression? Or any other way?
Copy link to clipboard
Copied
If you can set a keyframe for a property then you can almost always control that property with an expression. In earlier versions of AE, masks were an exception. I'm not sure if there are still exceptions because I have not tried every effect, but you can pretty much count on the ability to use and expression on any property that can be animated. If you cannot set a keyframe and animate the property, you cannot drive that property by an expression. Set Matte does not have a stopwatch so you cannot drive that property with an expression.
If that was my project I might make all 3 layers 3D, pre-compose the top and bottom layer, then collapse transformations. Then I would add these expressions to the top and bottom layer Anchor Point.
// Top Layer
ofst = comp("Comp 1").layer("Middle").transform.anchorPoint[2];
[value[0], value[1], ofst + 1]
// Bottom Layer
ofst = comp("Comp 1").layer("Middle").transform.anchorPoint[2];
[value[0], value[1], ofst - 1]
As long as you keep the X, Y rotation, and orientation properties of the 3 layers set to zero, and as long as you keep the Z position of all layers the same, this will work because the layers will always be separated by 1 pixel.
The other option is to keep the layers 2D, duplicate the middle layer, set the middle layer as a track matte for the back layer, and tie the position property of the middle layer copy in the pre-comp to the position property of the middle layer in the main comp.
Copy link to clipboard
Copied
It's pretty lame that you can't add an expression for layers. It makes me wonder why Adobe left the property pickwhip next to them. I really just wanted to use thisComp.layer(index - 1) for mine so I could more quickly hack something together.
And before anyone gets all upiddy about just using a trackMatte, they aren't the same. I've got a rather complex title box that is Fairly responsive, driven by essential graphics. Checking continuously rasterize fails. It was not designed for that. And my coworker wants the background blurred behind each instance. So my hack was to use a set matte effect to point to the layer above, alpha, then I crushed the alpha gamma 3 times. It only lets you get to gamma of 5. The layer above has a rectangle that is 60% transparent. So the first one probably brought it to close to 10%, the second one probably got it to 1% or so, so I added another one for good measure. Then I used That layer as a trackMatte for the adjustment layer below.
It was fairly low on the time consuming scale, and it did it's job for now. But there are a Lot of titles. It would have been nice if I could have done an expression so that all I had to do was duplicate the two layers and move them below the next title. And repeat. But I then have to select each one, and select the title from the dropdown one at a time.
I hoped to cheat it somehow with a pickwhip, but no such luck. Sure would have been nice if they had that open to expressions, or Some way to drive it.
Copy link to clipboard
Copied
I concur with Rick. That old scissors thing is tricky to do strictly in 2D and your use of shape layers would require additional pre-composing to get the Set Matte effect to behave correctly in the first place. If a faux 3D approach works, then use that. Otherwise you would have to work with multiple duplicates and create the illusion with invisible cuts/ opacity animation switching back and forth different layers.
Mylenium
Copy link to clipboard
Copied
Well done, guys! 3D layers with z-position - nice decision.
Look at left arm of that character, it works fine. Thank you!
Copy link to clipboard
Copied
hello how can I animate scissor vector
i want scissor to open and close
I can`t do it