Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Need to Optimize Expression Evaluation (valueAtTime)

  • Need to Optimize Expression Evaluation (valueAtTime)

    Posted by Shane Starnes on July 28, 2023 at 2:44 pm

    Hey guys,

    I have projects with 100’s of lines of code for sourceText, anchor point, position, scale, etc. Almost all of these are static, and are required simply for layout purposes. However, render times have increased exponentially, far beyond our maximum allowable.

    After some digging, I’m considering setting up Parent layers for each element, active for 1 frame. These would house all of the expressions. Then, I would use “valueAtTime” for each property on a duplicate of the Parent layers, in their proper spaces/times. My hope is that the expressions are evaluated once, dropping the number of evaluations from 1 per frame (899 for a 30sec video) down to 1 single frame. Is this feasible based on how AE evaluates expressions?

    Shane Starnes replied 3 years, 1 month ago 2 Members · 4 Replies
  • 4 Replies
  • Dan Ebberts

    July 28, 2023 at 6:19 pm

    Have you tried beginning your expressions with posterizeTime(0) ?

  • Shane Starnes

    July 28, 2023 at 8:29 pm

    I started with posterizeTime(1), and noticed slight performance enhancement.. Is this the traditional method of handling these types of issues? I was considering pulling everything heavy with expressions into a pre-comp and set them as active for 1 frame, then using “Freeze Frame” on those pre-comps. posterizeTime(0) would be much simpler than an entire re-structuring of the project. Do you think it would accomplish the same goal as my idea?

  • Dan Ebberts

    July 28, 2023 at 10:11 pm

    I’m not sure, but I’d say it’s worth a try.

  • Shane Starnes

    July 31, 2023 at 8:09 pm

    Hey Dan,

    Fixed the issue, wanted to fill you in.

    • Regular comp, tons of expressions: 14:51 render time
    • posterizeTime(0) in front of each expression: 9:16 render time
    • posterizeTime(0) + “Freeze Frame” on comps with one single active frame: 1:36 render time

    Thank you, as always, for the help 🙂

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