Highlighted

Set matte expressions

New Here ,
Nov 08, 2020

Copy link to clipboard

Copied

Hi!

Is there a way to set matte on layer with expression?

TOPICS
Expressions

Views

46

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Set matte expressions

New Here ,
Nov 08, 2020

Copy link to clipboard

Copied

Hi!

Is there a way to set matte on layer with expression?

TOPICS
Expressions

Views

47

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Nov 08, 2020 0
Most Valuable Participant ,
Nov 08, 2020

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

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 08, 2020 0
New Here ,
Nov 11, 2020

Copy link to clipboard

Copied

All right, some explanaition is here.

Let I have Comp 1 with tree layers like this.

pic-1.png

 

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.

pic-2.png

 

Now I have two nested comps: and Scissors and Comp 1.

pic-3.png

 

pic-4.png

 

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.

pic-5.png

 

pic-6.png

 

So, is there a way to set matte on layer with expression? Or any other way?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 11, 2020 0
Adobe Community Professional ,
Nov 11, 2020

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.

Screenshot_2020-11-11 06.37.18_C6lr63.png

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.

Screenshot_2020-11-11 06.52.20_irnGY5.png

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 11, 2020 0
Most Valuable Participant ,
Nov 11, 2020

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

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 11, 2020 0
New Here ,
Nov 11, 2020

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!

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 11, 2020 0