ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Time Remap with Sliders

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Marlon Brown
Time Remap with Sliders
on Jul 18, 2018 at 3:00:22 pm

I'm trying to write and expression that allows you to control the hold time between keyframes with sliders. There are 4 holds: Keyframes 2-3, 5-6, 8-9, and 11-12. I would like each hold to be controlled by its own slider, 4 sliders in total. I started below, but I don't know if I'm heading in the right direction.

Thanks!

holdTime = thisComp.layer("control").effect("hold")("Slider")
k1 = 2; // 1st hold keyframe
k2 = 3; // 2nd hold keyframe
k3 = 5; // 3rd hold keyframe
k4 = 6; // 4th hold keyframe
k5 = 8; // 5th hold keyframe
k6 = 9; // 6th hold keyframe
k7 = 11; // 7th hold keyframe
k8 = 12; // 8th hold keyframe

p = timeRemap
t1 = p.key(k1).time;
t2 = t1 + holdTime -1.5;

if (time &lt; t1)
t = time
else if (time &lt; t2)
t = linear(time,t1,t2,t1,p.key(k2).time)
else
t = p.key(k2).time + (time - t2);
valueAtTime(t)


Return to posts index

Kalleheikki Kannisto
Re: Time Remap with Sliders
on Jul 23, 2018 at 8:44:26 am

I do not understand your objective. If you're already using keyframes, what do you need the expression for exactly?

Kalleheikki Kannisto
Senior Graphic Designer


Return to posts index

Marlon Brown
Re: Time Remap with Sliders
on Jul 23, 2018 at 1:03:10 pm

I’m creating a template for a team with very limited after effects knowledge. The keyframes let after effects know where holds in the animation occur. The point is to make it so they use sliders to control holds and never have to touch keyframes. If you have a more efficient idea please let me know.


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 CreativeCOW.net All Rights Reserved
[TOP]