Keyframe-less Position animation. Trying to use multiple Interpolation expressions in one property
- October 4, 2021
- 3 replies
- 787 views
Hi all, i'm not the most familiar with expressions, but am attempting to make a simple, animated lower-thirds title MOGRT and have run into an issue.
I have two text ("TITLE" and "SUB-TITLE") elements that are placed over a shape layer.
I want my animation to have the shape layer extend with the width of the text as it's revealed and i've made an if/else expression to have the shape layer automatically scale with the width of the widest text element.
The issue i'm running into is it appears to only allow me to use one interpolation
ease(t, tMin, tMax, value1, value2)
to have the shape layer animate in, but not a second one to close out the animation.
Here is the expression for my shape layer:
var TextWidth;
if(thisComp.layer("TITLE").sourceRectAtTime().width>thisComp.layer("SUB-TITLE").sourceRectAtTime().width) TextWidth=thisComp.layer("TITLE").sourceRectAtTime().width
else TextWidth=thisComp.layer("SUB-TITLE").sourceRectAtTime().width;
var BoxWidth;
if(TextWidth<1) BoxWidth=-70
else BoxWidth=TextWidth;
var xBegin=134;
var y=134;
var Zing = effect("\"Zing\" Slider Control")("Slider")
ease(timeToFrames(t = time + thisComp.displayStartTime, fps = 29.97), 8, 17, [xBegin,y], [xBegin+Zing+BoxWidth,y]);
Ideally, I would want to have a second interpolation that looks like this, right after the first (ease).
ease(timeToFrames(t = time + thisComp.displayStartTime, fps = 29.97), 147, 156, [xBegin+Zing+BoxWidth,y], [xBegin,y]);However, everytime I have more than 1 interpolation, the animation goes wonky and seems to ignore the first ease.
I attached a gif showcasing what I want the animation to look like (acheived though keyframes for demonstation) as well as the error that having two interpolation expressions appears to cause.
Any thoughts on how I can achieve this with or withoute interpolation?
