Trigger a composition closure using TimeRemapping

Moderators: Disciple, zlovatt

Post Reply
User avatar
ghaffar3
Posts: 2
Joined: February 10th, 2019, 10:06 am

I'm trying to trigger a composition closure using a TimeRemap on the composition with 4 key frames, with the script as follows:

clockStart = parseInt(comp("main").layer(5).text.sourceText.value);
clockTime = clockStart-1*(time);

sIn = key(2).time - key(1).time;
sOut = key(4).time - key(3).time;

if (time < clockStart)
linear(time,sIn,key(2).time,key(1).value,key(2).value)
else if (time >clockStart)
{
linear(time,key(3).time,sOut,key(3).value,key(4).value);
}

So basically I want to trigger the key3, if the time is greater the clockStart (which is timer for the value in clockStart) and will go to 0 when time passes clockStart.
In the above case it does a trigger but the issue I'm having is I need to readjust key4 keyframe.time manually everytime I change the clockStart value otherwise it give's me a cut instead of a smooth fadeout.

E.g. if the clockStart is 14, the value for keyframe 4 works fine at 28
if the clockStart is 10, I need to adjust the keyframe 4 to 24 so I get a smooth fadeout.

Any ideas.
User avatar
Useful Design
Posts: 3
Joined: March 28th, 2019, 9:16 pm

Ive never used expressions before today and I'm thinking about expressions to do a similar kind of thing to save me a bunch of AE monkey work on a bunch on animations of text quotations. I was thinking about remapping the time of set compositions, but having watch two introductory videos on expressions, I think I can make it more parametric (flexible and powerful) for the end user (me and an assistant only at this stage) by using some maths and master values and referring to those master values in the animation.

I need four master time values to control all the transitions on a bunch of layers just fading things in and out and animating text range selector in and out according to the master inputs. All the other times will be derived from calculations involving these four inputs.

The inputs and calculated values will be (all time values):
totalAnimationTime: total time for composition to run from start to finish
delay1: first background element fade in, lasts entire length of comp
delay2: second background element a large ” glyph at start of quote
animateTextLine1: calculated from the four input values
delay3: second background element a large ” glyph at start of quote
animateTextLine2: calculated from the four input values
delay3: second background element a large ” glyph at start of quote
animateTextLine3: calculated from the four input values
delay2: fade out second background element a large ” glyph at end of quote
delay1: first background element fade out

At first I will have sliders set to fixed values for the four input values. Later I will arrive at them with more sophisticated calculation to have a "mix" slider for amount of delay verse no delay.

for a three line animation as above, the animatedTextLines time period = (TAT – 2*(delay1 + delay2 + delay3))*0.5
= TAT/2 – delay1 + delay2 + delay3

I think can make expressions for each of the opacities and Text Selection Ranges end values using these values I think, will get back to you if I succeed or have partial success and need help from someone.
User avatar
Useful Design
Posts: 3
Joined: March 28th, 2019, 9:16 pm

Sorry, TAT refers to totalAnimationTime value (for short)
Post Reply