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
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;
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.
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
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;
Copy link to clipboard
Copied
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;