Every nth frame

What type of scripts do you need?

Moderator: byronnash

Post Reply
3deutig
Posts: 2
Joined: January 21st, 2009, 6:32 am

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
User avatar
lloydalvarez
Enhancement master
Posts: 460
Joined: June 17th, 2004, 9:27 am
Location: New York City, NY
Contact:

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
3deutig
Posts: 2
Joined: January 21st, 2009, 6:32 am

wow that was a fast answer!

thx!
it works very well!

cu,
Jens
stefman
Posts: 12
Joined: April 11th, 2009, 8:47 am

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
User avatar
lloydalvarez
Enhancement master
Posts: 460
Joined: June 17th, 2004, 9:27 am
Location: New York City, NY
Contact:

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
stefman
Posts: 12
Joined: April 11th, 2009, 8:47 am

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
Dan Ebberts
Posts: 320
Joined: June 26th, 2004, 10:01 am
Location: Folsom, CA
Contact:

I think it would look like this:

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


Dan
Post Reply