Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Help With Expressions – Faking Stop Motion

  • Help With Expressions – Faking Stop Motion

    Posted by James Nannen on December 6, 2008 at 9:49 pm

    I do not know anything about expressions so I am asking if someone could throw something together for me.

    I need to fake some human stop motion with the video footage i have. To achieve the effect I think the video would need to skip 4 frames and then play the same frame twice. I think that time remapping can do this but need an expression quickly get the effect to the long footage.

    If you could see the original footage in a timeline it would look like A0000B0000C0000D. Basically what i would want it to do is skip the “0” and then play the each letter twice to get the result of AABBCCDD.

    The expression would then be: frame play 2 times, jump 4 frames ahead, and then repeat.

    If it is possible could you make the frames skipping and frame repeating variables so I can modify it to get the effect right.

    This link may help, its close to something I want but not. https://safari.oreilly.com/9780321618023/ch10lev1sec8 . I have been trying to modify the code to get what I want but can not figure it out and might help whoever else get started.

    Felipe Reynoso replied 12 years, 7 months ago 4 Members · 6 Replies
  • 6 Replies
  • Dan Ebberts

    December 7, 2008 at 8:21 am

    Give this a try:

    n = 5; // play every 5th frame
    m = 2; // play each frame twice

    f = timeToFrames();
    p = Math.floor(f/m);
    framesToTime(p*n)

    Dan

  • James Nannen

    December 7, 2008 at 6:27 pm
    n = effect("frames skipped")("Slider");
    m = effect("frame repeat")("Slider");
    
    f = timeToFrames(); 
    p = Math.floor(f/m); 
    framesToTime(p*n);
    

    I modified it to be controlled with sliders and it works perfectly. I can not thank you enough for your help.

  • Michael Crissinger

    May 15, 2010 at 4:58 pm

    I’m totally new to expressions and want to implement with effect as well.

    I can get as far as typing the code but I’m not sure if I’m assigning it to the correct transform property – I’ve been been trying it to add it to position.

    Would it be possible for someone to tell me exactly where to add this code and exactly what it should look like?

    What I could figure from the previous posts are below…

    Thanks!

    n=5
    m=2

    f=timeToFrames ( )
    p=Math.floor(f/m)
    framesToTime(p*n)

  • Dan Ebberts

    May 15, 2010 at 5:27 pm

    You would apply the expression to the time remap property of a footage or precomp layer (after enabling time remapping of course).

    Dan

  • Michael Crissinger

    May 15, 2010 at 5:48 pm

    Thanks for the quick reply Dan!

    Got it working:)

  • Felipe Reynoso

    January 29, 2014 at 7:33 pm

    If you have it working with the sliders, how would you accomplish it? Do you put the code within Time Remapping or in the Slider?

    n = effect("frames skipped")("Slider");

    m = effect("frame repeat")("Slider");

    f = timeToFrames();

    p = Math.floor(f/m);

    framesToTime(p*n);

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy