AE ENHANCERS

Expressions/Scripts/Presets
It is currently Wed Jul 30, 2014 4:15 pm

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Every other frame
PostPosted: Fri Apr 04, 2008 1:39 pm 
Offline

Joined: Wed Mar 05, 2008 11:48 am
Posts: 13
I've got an animated layer, and my comp is 30fps, but I want this layer to update every other frame (or maybe every 3rd or 4th frame), so it will appear to be running at a lower frame rate. Is there an easy way to do this with an expression? In this particular case, I'm just animating the position values.

My workaround so far has been to use the wiggler with a magnitude of 0 and a frequency of 15 to insert keyframes (every other frame) then setting them all as holds. This has been working well, but if I want to tweak my animation, I have to remove a bunch of keyframes and repeat the process, which is messing up my workflow.

Thanks as always!

_________________
alanhettinger.com


Top
 Profile  
 
 Post subject: Re: Every other frame
PostPosted: Fri Apr 04, 2008 2:49 pm 
Offline

Joined: Wed Mar 05, 2008 11:48 am
Posts: 13
Ok, got my answer.
Code:
posterizeTime(15);
value;

_________________
alanhettinger.com


Top
 Profile  
 
 Post subject: Re: Every other frame
PostPosted: Thu May 22, 2008 9:32 am 
Offline

Joined: Thu Mar 01, 2007 11:12 pm
Posts: 17
Location: Poland, Warsaw
You can also try doing it like this. Your solution is in fact easier, but might not work for all cases.
I'm not saying this one will. It's just a different approach.

Code:
currentFrame = timeToFrames(t = time + thisComp.displayStartTime, fps = 1.0 / thisComp.frameDuration, isDuration = false);

if(currentFrame % 2 == 0){
     // do this
} else {
    // do that
}


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 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