Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Posterizetime on keyframed position, but with additional jumpy wiggle?

  • Posterizetime on keyframed position, but with additional jumpy wiggle?

    Posted by Tim Drage on September 18, 2012 at 4:57 pm

    Seems like this should be really simple but somehow can’t get my head around it today. :-S

    I am making faux childish handmade-looking stop motion cutout paper style animation; for quick animation of a lot of layers I wish to animate the position with a reduced framerate. I can do this on its own with posterizetime(), but on top of that, (and ideally with the possibility of a different reduced/posterized framerate) I wish to have the good old “jumpy wiggle” expression: // Jumpy Wiggle 2 (moves at a defined FPS)
    fps=5; //frequency
    amount=50; //amplitude
    wiggle(fps,amount,octaves = 1, amp_mult = 0.5,(Math.round(time*fps))/fps);

    I can’t find a way to posterize the position animation while also wiggling, and I think I’m maybe overthinking it/confusing myself/not enough or too much coffee. Any help would be appreciated.

    P.S. I do realise that i could do things like put the posterize time on Position and the wiggle on Anchor point, or put them seperately on parented null objects etc but I’d rather find a good way to keep it to one single expression I can neatly paste to 100s of various layers 🙂

    P.P.S. before you suggest doing it in a low frame rate comp that’s no good because I’d like to mix and vary framerates, add extra camera shake, film jump, exposure fluctuations, grain etc. as if it’s been animated on 4s or whatever by pressing the trigger 4 times per frame with various irregularities/accidental movements, as opposed to just shot at a fixed low frame rate webcam style.

    THANKS
    Tim

    Dan Ebberts replied 13 years, 7 months ago 2 Members · 3 Replies
  • 3 Replies
  • Dan Ebberts

    September 18, 2012 at 6:55 pm

    Something like this should posterize the wiggle at 10 fps and your keyframed values at 5 fps:

    freq = 5; // wiggle frequency
    amp = 50; // wiggle amplitude

    fps1 = 10; // wiggle posterize
    fps2 = 5; // keyframed value posterize

    t1 = Math.floor(time*fps1)/fps1;
    t2 = Math.floor(time*fps2)/fps2;
    w = wiggle(5,50,1,.5,t1) – valueAtTime(t1);
    valueAtTime(t2) + w

    Dan

  • Tim Drage

    September 19, 2012 at 9:11 am

    Thanks, that’s really great!!!! I need to figure out Math.floor, wouldn’t have managed to come up with that on my own.

    I fixed/modified it to put the freq + amp into the wiggle 🙂 Probably will control all these things with sliders in the end.

    freq = 5; // wiggle frequency
    amp = 8; // wiggle amplitude
    fps1 = 4; // wiggle posterize
    fps2 = 8; // keyframed value posterize
    t1 = Math.floor(time*fps1)/fps1;
    t2 = Math.floor(time*fps2)/fps2;
    w = wiggle(freq, amp,1,.5,t1) - valueAtTime(t1);
    valueAtTime(t2) + w

  • Dan Ebberts

    September 19, 2012 at 1:26 pm

    >I fixed/modified it to put the freq + amp into the wiggle 🙂

    Ah, yes. Good catch.

    Dan

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