Expressions/Scripts/Presets

Moderators: Disciple, zlovatt

 
ahettinger
Topic Author
Posts: 13
Joined: Wed Mar 05, 2008 11:48 am

Every other frame

Fri Apr 04, 2008 1:39 pm

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!
 
ahettinger
Topic Author
Posts: 13
Joined: Wed Mar 05, 2008 11:48 am

Re: Every other frame

Fri Apr 04, 2008 2:49 pm

Ok, got my answer.
posterizeTime(15);
value;
 
explorer
Posts: 17
Joined: Thu Mar 01, 2007 11:12 pm
Location: Poland, Warsaw

Re: Every other frame

Thu May 22, 2008 9:32 am

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.

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

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

Who is online

Users browsing this forum: No registered users and 4 guests