Activity › Forums › Adobe After Effects › Slowing speed-slider down makes animation go reverse!
-
Slowing speed-slider down makes animation go reverse!
Posted by Thor64 on December 28, 2005 at 3:16 pmI know its my understanding of speed that is wrong…
It doesn’t work properly when I keyframe the slider values. It accelerates to much and goes in reverse instead of slowing down.mySpeed=effect(“speed”)(“Slider”);
x=Math.cos(time*mySpeed)*100;
y=Math.sin(time*mySpeed)*100;[250+x,250+y]
take a look:
http://www.knalle.dk/Speed.aepDan Ebbertsreplied 20 years, 4 months ago 2 Members · 6 Replies
-
6 Replies
-
Dan Ebberts
December 28, 2005 at 4:06 pmWhat you’re seeing is a little difficult to explain but let me give it a shot. At any given frame, your expression picks up the current value of your speed slider and uses that to calculate the positon of your layer. The result you get is the same as if you had hard-coded that slider value into the expression. That is, at each frame, the calculation acts as though the slider has always been at its current value. Previous slider values have no effect on where the layer ends up – only the current value. Getting around this with an expression is a little complicated. Why not just parent your layer to a null and rotate the null?
Dan
-
Thor64
December 28, 2005 at 4:31 pmThis was only a simple example to represent my speed problems 😉
Im making this running guy (https://www.knalle.dk/TEE_guy.mov)- and adjusting the speed slider gives me the same problems (he runs backwards when slowing down).
Maybe I should avoid using time in my expressions -
Thor64
December 28, 2005 at 4:54 pmit gives the same result when i change the rotation speed of the null.
I think I might need some delta stuff, but i don’t know how it should look. -
Dan Ebberts
December 28, 2005 at 4:58 pmYou might be better off calculating the number of run cycles (and current phase) based on how far your running guy has traveled (assuming he always goes in the same direction). Actually, that would be a fun expression. Kind of like calculating the rotation of a wheel based on distance traveled, only more complicated. 🙂
Dan
-
Dan Ebberts
December 28, 2005 at 5:39 pmIf you do it this way, you’ll end up with a rotation expression that looks something like this:
amp = 30;
stride = 50;
dist = position[0] – position.valueAtTime(0)[0];
cycles = dist/stride;
value + amp*Math.sin(cycles*Math.PI*2)With possibly an initial phase offset to put the leg in the correct position at time = 0.
Dan
Reply to this Discussion! Login or Sign Up