Page 1 of 1

Every nth frame

Posted: January 21st, 2009, 7:34 am
by 3deutig
hi guys,

in after effects there is no way to import a picture sequence and say take only every nth frame.

so my question is when i have a CG rendering done in 25fps and i want only take every nth frame in my 25fps comp so is it possible to do this over a expresssion in the time remapping layer?

i want to have a stop motion look. so no smooth animation. i need the jumps over the same time. i hope u understand me what i need.thx!

ciao,
Jens

Jens Hedrich
CEO - Supervisor
http://www.3deutig.com

Re: Every nth frame

Posted: January 21st, 2009, 8:26 am
by lloydalvarez
This should do what you want, add it as an expression to Time Remap.

Code: Select all

nthFrame = 3;  

fps = (1.0/thisComp.frameDuration) /  nthFrame;
posterizeTime (fps);
value

Re: Every nth frame

Posted: January 21st, 2009, 8:34 am
by 3deutig
wow that was a fast answer!

thx!
it works very well!

cu,
Jens

Re: Every nth frame

Posted: September 26th, 2009, 1:10 pm
by stefman
Hi,

I'd like to know if there's a way to modify this expression to show ranges of frames.

e.g.: show the first 5 frames, then don't show the next 5 frames, show the next 5 frames, ....

Kind of "show n frames every nth frames".

Cheers,

stefman

Re: Every nth frame

Posted: September 26th, 2009, 1:18 pm
by lloydalvarez
Hi Stefan,

What do you mean by "show". You want the opacity to go to zero or do you want to compress the sequence by removing the frames.

-Lloyd

Re: Every nth frame

Posted: September 26th, 2009, 1:45 pm
by stefman
Hi Lloyd,

I'd like to remove frames.

That means that I'd like to exclude a series of n frames every nth frame.

If e.g. I excluded 2 frames every third frame, in the remapped result AE would play only these frames:

1,2, (excluded) ,5,6, (excluded) 9,10,....

Stef

Re: Every nth frame

Posted: September 26th, 2009, 8:19 pm
by Dan Ebberts
I think it would look like this:

n = 5;
f = timeToFrames();
framesToTime(Math.floor(f/n)*2*n + f%n)


Dan