Imitating a film projector with FPS control

Moderators: Disciple, zlovatt

Post Reply
User avatar
lloydalvarez
Enhancement master
Posts: 460
Joined: June 17th, 2004, 9:27 am
Location: New York City, NY
Contact:

Add the Distort->Offset plugin to a piece of footage and add this expression to the "Shift Center To" property. If you want a black line or film frame around the footage, pre-comp and do it there.

Code: Select all

fps= 24; 
t=time * fps; 
move= t * thisComp.height; 
reset=Math.floor(move/thisComp.height); 
moveReset=move-reset*thisComp.height; 

[thisProperty[0],thisProperty[1] + moveReset]
You can also add a slider to the fps property to animate it and simulate adjusting the framer on a projector. Add an Expression Controls->Slider Control Effect to the layer and change the expression of the "Shift Center To" property to this:

Code: Select all

fps= effect("Slider Control")("Slider");
t=time * fps; 
move= t * thisComp.height; 
reset=Math.floor(move/thisComp.height); 
moveReset=move-reset*thisComp.height;

[thisProperty[0],thisProperty[1] + moveReset] 

Finally to add some flicker, add this expression to the Opacity:

Code: Select all

wiggle (effect("Slider Control")("Slider"), 20)
thanks to goldomega for the reset part of the expression
Last edited by lloydalvarez on January 11th, 2006, 11:21 am, edited 1 time in total.
goldomega
Posts: 9
Joined: August 12th, 2005, 8:54 am
Location: Rochester, NH

Very neat expression, Lloyd.

To clarify for people who are seeing this expression for the first time, the 'reset' part of the code is to keep the value on "ShiftCenterTo" from becoming astronomically high. Effects in some versions of After Effects don't handle high numbers well.

As a suggestion, it might be useful to also apply a vertical Directional Blur with an expression that links the length of the blur with the speed of the offset effect.

Blur Length
multiplier=.0001;
effect("Offset")("Shift Center To")[1].speed*multiplier

Simply increase the multiplier or the speed of the offset to increase the blur.
User avatar
lloydalvarez
Enhancement master
Posts: 460
Joined: June 17th, 2004, 9:27 am
Location: New York City, NY
Contact:

great addition goldomega, since the Offset plugin does not motion blur!

Small correction to the expression, apparently .speed only pulls a 1 number array, so no need for the [1]:

Code: Select all

multiplier=.0001; 
effect("Offset")("Shift Center To").speed*multiplier
Post Reply