• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Set Matte behavior

Community Beginner ,
Jan 16, 2024 Jan 16, 2024

Copy link to clipboard

Copied

Hi Friends,

I use Set Matte to add the alpha channel from layer2 to layer1.

But if offset the inPoint from layer2 to sec 1, I still see the alpha in layer1 from 0-1sec and actually I expected to see nothing. If I use the Track Matte this works fine.

Anybody know how I can correct this behavior?

 

thanks

Tudor

TOPICS
FAQ , How to , Resources

Views

228

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
community guidelines

correct answers 1 Correct answer

Community Beginner , Jan 19, 2024 Jan 19, 2024

After some try and error and help from Rick I think I found a good solution for me.

I use CC composite to copy the layer and put in the opacity attribute an expression.

Its not absolute the same like the track layer option, but I think not bad to merge multiple layers.

var myLayer = effect("CC Composite")("Top Layer")
time<myLayer.inPoint || time>myLayer.outPoint ? 0 : myLayer.transform.opacity;

Votes

Translate

Translate
Community Expert ,
Jan 17, 2024 Jan 17, 2024

Copy link to clipboard

Copied

If you want to turn Set Matte on and off, you have to add a mask to the layer that has set matte applied by double clicking the rectangle tool, add the mask as compositing options, and then, to avoid using keyframes, add this expression to mask opacity:

 

matteLayer = thisComp.layer("Matte layer");
lStrt = matteLayer.inPoint;
lEnd = matteLayer.outPoint;
if (time > lStrt && time < lEnd)
	t = 100;
else
	t = 0;

 

I've used this approach a few times with multiple copies of Set Matte and other effects on the same layer to turn an effect on and off automatically based on another layer's in and out points. You can even add an Ease function to both the in- and out-point calculations to make the effect fade in and out based on the Matte layers' in and out points.

RickGerard_0-1705489575533.gif

 

Votes

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
community guidelines
Community Beginner ,
Jan 17, 2024 Jan 17, 2024

Copy link to clipboard

Copied

Hmmm ok,
I thing this not bad to trun the visibility on and off, but to work with a mask is a bit to much to setup.
I think will use the calculation Fx and apply to the Second Layer Opacity attribute the expression:

var myLayer = effect("Calculations")("Second Layer");
time<myLayer.inPoint || time>myLayer.outPoint ? 0 : 100; 

It seems to work fine. 🙂
Thanks for your inspiration 

Votes

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
community guidelines
Community Expert ,
Jan 17, 2024 Jan 17, 2024

Copy link to clipboard

Copied

You can also add a fade in and fade out to the effect using something like this:

var myLayer = thisComp.layer("My Layer");
t = time - myLayer.inPoint;
t0 = time - myLayer.outPoint;
fadeIn = ease(t, 0, .5, 0, 100);
fadeOut = ease(t0, -.5, 0, 0, -100);
time<myLayer.inPoint || time>myLayer.outPoint ? 0 : fadeIn + fadeOut; 

 

Votes

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
community guidelines
Community Beginner ,
Jan 19, 2024 Jan 19, 2024

Copy link to clipboard

Copied

LATEST

After some try and error and help from Rick I think I found a good solution for me.

I use CC composite to copy the layer and put in the opacity attribute an expression.

Its not absolute the same like the track layer option, but I think not bad to merge multiple layers.

var myLayer = effect("CC Composite")("Top Layer")
time<myLayer.inPoint || time>myLayer.outPoint ? 0 : myLayer.transform.opacity;

Votes

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
community guidelines