3 Replies Latest reply on Jun 6, 2013 8:05 AM by maxweel

    Expressions/Effects on final render only

    bryab

      I have a general workflow question that I think is worth discussing.

       

      Our production uses a LOT of expressions.  Possibly too many -- it seems AE is not happy with evaluating hundreds and hundreds of expressions every frame.

       

      However, many of these expressions aren't really necessary when doing RAM Previews or when working in general.  They are only needed when the final product is rendered.

       

      An example is an expression that makes properties "animate on twos", that is, skip every other frame.  This expression is on almost every single layer, except for a few that need to be on ones.

       

      I am wondering if anyone has figured out a workflow that allows for expressions to be somehow skipped until a real render is made.  I would also ask the same about effects.

       

      Thank you!

        • 2. Re: Expressions/Effects on final render only
          bryab Level 1

          This script is a good idea, I may make one that disables certain expressions in a comp as well.

           

          But it would be great if you had more built-in control over how and when expressions are evaluated.  Like specifying that an expression should only be evaluated once, not every frame, or only evaluated on "draft" or something like that.

           

          The expressions engine is so incredibly powerful and useful. But it could be even moreso with a few extra features.  Like globally defined funcitons, global variables, etc.  And also some protection against "stack overrun" errors.  Better handling of errors (so that you don't get 100 layers all erroring out their expressions) would also be nice.

          • 3. Re: Expressions/Effects on final render only
            maxweel Level 2

            "specifying that an expression should only be evaluated once"

            Add a posterizeTime or if (time == 0) at the beginning of your expression

             

            "or only evaluated on "draft" or something like that"

            Use a checkbox on another layer to control whether expressions should be calculated or not.

             

            "Better handling of errors "

            add try/catch in your code

             

            So you could do something like:

             

            if (time == 0 && comp("...").layer("...").effect("Use Expressions")(1))

            {

                // your heavy expression

            }

            else value;

             

            Global functions may be useful, but global variables would make thing terribly messy. Plus when you add an expression control you basically create a global variable (even though you can't set it's value).