Skip to main content
Known Participant
August 8, 2023
Question

Expression

  • August 8, 2023
  • 1 reply
  • 294 views

Hello There, I'm Character Animator & I use a lot of Expressions and connect with the slider control and Time remapping when I try to animate with a keyframe nothing works so I need a guide or pdf about expression.

This topic has been closed for replies.

1 reply

Community Expert
August 8, 2023

Time Remapping only works on a. nested comp (a pre-comp) that is already animated or on a movie in the timeline.  It looks like you have just created an expression that turns the slider value into a frame number. If the slider value increases, the time changes. Assuming you are working with a 30 fps comp, animating the slider from zero to ten over five seconds will slow down the original movement from a third of a second to five seconds. If you then animate the slider from ten to zero, the action will reverse because the slider value will always return the corresponding frame number.  

 

Your expression uses framesToTime, so the slider's maximum value should be limited to one frame less than the last default time remapping keyframe. You can accomplish that with this expression applied to the slider control:

 

a = thisComp.layer("Main Controller").effect("Head Control")("Slider");
t = framesToTime(a);
tMax = key(2).time - thisComp.frameDuration;
linear(t, 0, tMax)

 

This won't limit the value you can assign to the slider but will prevent the slider from displaying empty frames. 

 

If that's not what you need, let me know. Just remember that the slider value increasing means the action will move forward, and the slider value going down will reverse the motion in the frame.

 

I have added a similar expression to a slider so that the slider's value is limited to the number of frames between the first and last time remapping keyframe. Run the slider value past the maximum value or less than zero, and it will always return the first or last frame of the animation. 

Known Participant
August 9, 2023

Thank you for your reply, I upload a video about the main problem.