Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions How can I make this expression less heavy (RAM)?

  • How can I make this expression less heavy (RAM)?

    Posted by Stef Prein on September 26, 2023 at 3:39 pm

    Hi,

    For a client’s project we have used this expression to control layers with a gradient:

    x = thisComp.layer(“Gradient”).sampleImage(transform.position, [.5,.5]/2, true, time)[0]; 100*[x,x]

    Use is described in the following video: https://www.youtube.com/watch?v=1UaZNcVobhg.

    This should enable us to create similar animations as in the first 5 sec of this video: https://www.youtube.com/watch?v=4TJVvfFZELE.

    Using the gradient expression gets us close, but doesn’t allow for subtle movements of dots in the matrix. But the biggest issue with this expression is that is it crazy heavy if you have the amount of layers needed to recreate the animation from the example video (don’t worry, we’re not stealing any one’s work, Choreograph is our client, the example animation was made by a previous vendor).

    So, I guess my question could go in 2 directions:

    1. Is there a way to get better control over a matrix of dots like in the example (that’s is less heavy)?

    2. Is there a better version of the above expression that needs less RAM?

    Thank you!

    Stef

    P.S. I used to an animator, but I produce now and my skills are very rusty. I’m just trying to help our animators out with this question 🙂

    Some contents or functionalities here are not available due to your cookie preferences!

    This happens because the functionality/content marked as “Google Youtube” uses cookies that you choosed to keep disabled. In order to view this content or use this functionality, please enable cookies: click here to open your cookie preferences.

    Kamil Kurylonek replied 2 years, 6 months ago 2 Members · 1 Reply
  • 1 Reply
  • Kamil Kurylonek

    October 26, 2023 at 3:00 pm

    x = thisComp.layer(“Gradient”).sampleImage(transform.position, [.5,.5]/2, true, time)[0]; 100*[x,x]

    Values in the square brackets [.5,.5] control “search radius” for your expression. Smaller values, more precision, but more resource intensive. Maybe try bumping them up to higher value?

    Less heavy approach would be to pre-render your layer that you use for the scale animation as ProRes. Then bring it back into AE to reduce amount of calculations software needs to do?

    In the past I used similar sampleImage approach for a project and it was really hard to pull off. AE would grind to a halt on a powerful machine. This expression is really intensive. Have you tried creating animation by using a plugin

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