Activity › Forums › Adobe After Effects Expressions › speeding up a looped layer
-
speeding up a looped layer
Posted by Anita Sancha on January 24, 2011 at 8:41 amHi..
I have a layer of a rocking oil donkey boom. I have set a few keyframes and got the boom rocking and looped it “loop out”. Is there an expression for looping these keyframes and also to get them speeding up as they loop so they get faster and faster as they loop.
Thanks Anita
Thanks for all your help
Anita Sancha.Olivia Ting replied 10 years, 2 months ago 5 Members · 8 Replies -
8 Replies
-
Kevin Camp
January 24, 2011 at 6:54 pmi think i’d probably try this by precomping the layer and adding timewarp to the precomp, then animate the speed property.
if you wanted to play around with an expression, this will create a loop and increase the rate of the loop for a given property. it does assume only 2 keyframes for the property.
rate=.4;
p=key(2).time-key(1).time;
linear((time+Math.exp(time*rate))%p,key(1).time,key(2).time,key(1).value,key(2).value)Kevin Camp
Senior Designer
KCPQ, KMYQ & KRCW -
Kevin Camp
January 24, 2011 at 7:16 pmthis expression may be a bit better, the speed ramp isn’t nearly as steep.
rate=1;
p=key(2).time-key(1).time;
linear((time*time*rate)%p,key(1).time,key(2).time,key(1).value,key(2).value)Kevin Camp
Senior Designer
KCPQ, KMYQ & KRCW -
Kevin Camp
January 24, 2011 at 7:19 pmor you could add a slider expression control and keyframe the slider values and get better control of the expression. a value of 1 for the slider would be realtime, 2 would the double the rate, etc…
rate=effect("Slider Control")("Slider");
p=key(2).time-key(1).time;
linear((time*rate)%p,key(1).time,key(2).time,key(1).value,key(2).value)Kevin Camp
Senior Designer
KCPQ, KMYQ & KRCW -
Dan Ebberts
January 24, 2011 at 8:11 pmAny time you keyframe a rate for an expression you need to be very careful. If you set the expression up to only look at the current value of the rate control, the expression assumes that the rate has always been at its current value, which clearly will not be the case. A few test cases using the graph editor will show you what kind of chaos can be created. To do it correctly, you really need to integrate the value of the rate control up to the current time, which is only easy to do if you can assume the keyframes are hold or linear.
Dan
-
Dan Ebberts
September 11, 2013 at 4:30 pm -
Ismael Millán
September 13, 2013 at 6:29 pm“Dan´s elastic rigging”
(sorry, google translate): Using the expression of Dan Ebberts “elastic” I’m trying to make a soft ik of rabbit ears. When the head that moving the tip of the ears follow it in an secondary animation , but I have problems. I do not know if you can do … Many thanks. I leave the link to the file dropbox. Aephttps://dl.dropboxusercontent.com/u/14838316/Dan_elastic_Rabbit_ear_secondary_animation.aep
-
Olivia Ting
March 17, 2016 at 10:25 pmI tried the Timewarp effect to a looped pre-comp (utilizing expression loopOut(type = “cycle”, numKeyframes = 0)) and it did work on the time control part, but for some reason it would only loop to a certain point and stop. When I turn off the Timewarp effect, the loop runs fine. What gives?
Reply to this Discussion! Login or Sign Up