Copy link to clipboard
Copied
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?
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]
Copy link to clipboard
Copied
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]
Copy link to clipboard
Copied
And that expression would go on the position property, right?
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
Cool and what if I need the maximum duration to be 10 seconds?
Copy link to clipboard
Copied
// between 1 & 10s
dur = Math.random() * 10 + 1;
// between 2 & 10s
dur = Math.random() * 9 + 2;
// between 3 & 10s
dur = Math.random() * 8 + 3;
Copy link to clipboard
Copied
Awesome! I'll try that.
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more