Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Better way to use gradient expression to control layers?

  • Better way to use gradient expression to control layers?

    Posted by Stef Prein on September 26, 2023 at 3:38 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 🙂

    Stef Prein replied 2 years, 7 months ago 2 Members · 2 Replies
  • 2 Replies
  • Filip Vandueren

    September 28, 2023 at 3:21 pm

    You can achieve this effect without expressions with the card dance effect,

    first create a repeating grid of circles, add a card-dance with the exact number of rows and columns, and use a gradient layer’s intensity to drive the X/Y scale of the ‘cards’

  • Stef Prein

    September 29, 2023 at 3:06 pm

    Thank you so much for your answer, Philip! We’re going to try this. That would make the project much more manageable.

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