Page 1 of 1

Time Accleration Woes

Posted: December 6th, 2007, 7:03 am
by Atomic
Hi All,

I have been trying and trying to find a way to speed up the time of a precomp. It seems like a simple enough feature, I see it all the time. And maybe I am making this more complicated than it needs to be. But here is what I want to do.

Let's say I have a ten second precomp.
I time remap it to 5 seconds. It now is traveling twice as fast as it was.

What I would like to do is still have it start off at normal speed, but by the time it gets to the end of the clip it is moving (let's say...) four times as fast as it orginally was before the time remap. So 4x normal speed. I'm not stuck on 4x, just an example number.

I don't know how to write an acceleration formula. It could be simple, I don't need drag or friction or any of that. Let's assume the newtonian model of all things in vacum kind of accleration with the result of the formula being a frame number between the inPoint and outPoint of the layer the expression is applied to.

:cry:

Posted: December 6th, 2007, 7:19 am
by Dan Ebberts
If you want to model graviational acceleration you could just use a time remapping expression like this:

g = .25;
g*time*time


Adjust g (gravitational constant) to suit.

Dan

Posted: December 6th, 2007, 11:56 am
by Atomic
Hi Dan,

That is close.

Here is my setup.
I have a comp with two layers in it. A text layer. A 50 frame precomp.

I apply this code to the text layer source text.

Code: Select all

f = timeToFrames(time);
g =0.0003
"Frame: " +  Math.round(g*f*f)
I apply this code to the precomp Time Remap.

Code: Select all

f = timeToFrames(time);
g =0.0003
Math.round(g*f*f)
The concept is that the text box will display what frame the time remap is displaying.

The odd thing is that this only displays half the frames. It seems to skip every other one. I suspect the round function may be eliminating half the footage. Using this code the composition displays images up to frame 25 (which is actually displaying frame 50).

Any clue :?:

Posted: December 6th, 2007, 12:54 pm
by Dan Ebberts
Hmmm.... not exactly sure what you're doing, but it seems like you would need to convert from frames back to seconds.

Dan

Posted: December 7th, 2007, 7:21 am
by Atomic
So Time Remap is expecting a "time" value, not a "frame" value?

I assumed Time Remap was expecting frames.

Posted: December 7th, 2007, 7:56 am
by Paul Tuersley
Time Remap expects/requires time in seconds when using expressions.

Posted: December 8th, 2007, 10:59 am
by Atomic
I guess, I was over-thinking it.

All I needed to do was to adjust the tangent handles of the time remap keyframes themselves to create a logarithmic curve.

No expression is needed.