Page 1 of 1

Imitating a film projector with FPS control

Posted: October 19th, 2005, 8:13 am
by lloydalvarez
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

Posted: October 20th, 2005, 11:23 am
by goldomega
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.

Posted: October 20th, 2005, 11:51 am
by lloydalvarez
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