Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions posterizeTime() errors

  • posterizeTime() errors

    Posted by Neal Hammers on August 7, 2014 at 5:02 pm

    Hi everyone,
    I used posterizeTime(12.5) expression time remap 25fps 3D footage – I need every second frame to be played to match it with handdrawn animation.
    However, I noticed odd jaggs and some 3D layers sliding off. For me it happened like this
    value 55 (frames 55,56)
    57 (57,58,59) !!!!
    59 (59)
    61 (61,62)
    .. same scenario around frame 115, where value is still 113.
    This I could live with by keying every 2nd frame, but I also need camera movement to be stepped… hell of the clicking for 500 frame shot.
    Is this just me or it is everyone? Looks like posterizeTime filter is acting similarly..
    What would be solution?

    posterizeTime(12.5); value

    Neal Hammers replied 11 years, 9 months ago 2 Members · 4 Replies
  • 4 Replies
  • Dan Ebberts

    August 7, 2014 at 6:04 pm

    I think I’d do it this way:

    f = timeToFrames(time);
    framesToTime(Math.floor(f/2)*2)

    Dan

  • Neal Hammers

    August 7, 2014 at 7:40 pm

    Terrific, Dan! You are saving my tomorrow. 🙂
    Tested your code and it worked (at least on CS4) – I shall try it tomorrow on CC.

    But then again, will this [posterizeTime(12.5); value] work with animated camera or should I think of other way? What is necessary to achieve is to sync animated 3D layers with the posterized footage, and therefore camera movement also should be stepped.

    Thank you very much for advice and your website. 🙂

  • Dan Ebberts

    August 7, 2014 at 9:57 pm

    If you have a keyframed property, you should be able to do something similar to get it on 2s:

    f = timeToFrames(time);
    valueAtTime(framesToTime(Math.floor(f/2)*2))

    Dan

  • Neal Hammers

    August 9, 2014 at 11:10 pm

    Thank you again, Dan.
    I ended up using last version of your code for both – animated transforms and timeRemap, just I had to adjust it to get the effects.

    f = timeToFrames(time);
    valueAtTime(framesToTime(Math.floor((f-1)/2)*2)) -> 1,1,3,3,5,5..

    I guess, your bit deserves to replace current info on posterizeTime() in AFX user’s guide, or Adobe should consider fixing that function.

    Neil

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