Skip to main content
New Participant
July 31, 2024
Answered

Animation Challenge

  • July 31, 2024
  • 1 reply
  • 821 views

I have a field of symbols of varying opacities and sizes (over 100). I need to animate all of them moving up and out of view at different speeds. I used null objects and animated them going from below the stage to above the stage and added a loopOut(type="continue") expression to the position property.

 

The problem is that the symbols leave the stage. Ideally, the symbols should cycle back from the bottom and to the top. I'm not sure how to get that to work. loopOut(type="cycle") does that, but the symbols appear back where they started.

 

Essentially, it should just be a continuous loop for every symbol. I was thinking a particle effect might help, but there are 2 symbols and they vary a bit. Any suggestions?

This topic has been closed for replies.
Correct answer Airweb_AE

Maybe something like this:

seedRandom(index, true);
dur = Math.random() * 3 + 1;
seedRandom(Math.floor(time / dur), true)
x = Math.random() * thisComp.width;
y = linear(time % dur, 0, dur, thisComp.height + sourceRectAtTime().height / 2, -sourceRectAtTime().height / 2);
[x, y]

1 reply

Airweb_AECorrect answer
Braniac
July 31, 2024

Maybe something like this:

seedRandom(index, true);
dur = Math.random() * 3 + 1;
seedRandom(Math.floor(time / dur), true)
x = Math.random() * thisComp.width;
y = linear(time % dur, 0, dur, thisComp.height + sourceRectAtTime().height / 2, -sourceRectAtTime().height / 2);
[x, y]
New Participant
July 31, 2024

And that expression would go on the position property, right?

 

New Participant
July 31, 2024

Yes, transform > position

you can adjust this line to control the random speed / duration

dur = Math.random() * 3 + 1;

Here, the shape layers take between 1 and 3 seconds to move across the screen.

  


Cool and what if I need the maximum duration to be 10 seconds?