AE ENHANCERS

Expressions/Scripts/Presets
It is currently Thu Apr 24, 2014 1:23 am

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Time Accleration Woes
PostPosted: Thu Dec 06, 2007 7:03 am 
Offline
User avatar

Joined: Mon Apr 30, 2007 5:55 am
Posts: 157
Location: United States, Ohio
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:


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 06, 2007 7:19 am 
Offline

Joined: Sat Jun 26, 2004 10:01 am
Posts: 304
Location: Folsom, CA
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

_________________
http://www.motionscript.com


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 06, 2007 11:56 am 
Offline
User avatar

Joined: Mon Apr 30, 2007 5:55 am
Posts: 157
Location: United States, Ohio
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:
f = timeToFrames(time);
g =0.0003
"Frame: " +  Math.round(g*f*f)


I apply this code to the precomp Time Remap.
Code:
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 :?:


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 06, 2007 12:54 pm 
Offline

Joined: Sat Jun 26, 2004 10:01 am
Posts: 304
Location: Folsom, CA
Hmmm.... not exactly sure what you're doing, but it seems like you would need to convert from frames back to seconds.

Dan

_________________
http://www.motionscript.com


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 07, 2007 7:21 am 
Offline
User avatar

Joined: Mon Apr 30, 2007 5:55 am
Posts: 157
Location: United States, Ohio
So Time Remap is expecting a "time" value, not a "frame" value?

I assumed Time Remap was expecting frames.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 07, 2007 7:56 am 
Offline

Joined: Sat Jun 05, 2004 7:59 am
Posts: 695
Location: London, UK
Time Remap expects/requires time in seconds when using expressions.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Dec 08, 2007 10:59 am 
Offline
User avatar

Joined: Mon Apr 30, 2007 5:55 am
Posts: 157
Location: United States, Ohio
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group