Adobe After Effects Expressions Forum
Emitting particles along dynamic mask path
Emitting particles along dynamic mask path
by Will Poillion on Apr 13, 2020 at 9:10:30 pm

Greetings all,

I'm trying to figure out the best way to implement what I'm after. I'm trying to use a particle emitter (Stardust/Particular, either one, though prefer Stardust) to shoot particles along a path. Particle emission is triggered from musical notes. So in essence, particles per second is 0 unless a note is currently on. Using Stardust mask emitter, I can reduce the part of the path that emits the particles to the very beginning of the path, and then using the speed along path property I can have those particles animate to the end. Problem is those particles loop back to the start of the path if their life is longer than the time it takes to reach the end of the path.

I could just use a light path, and I think that would solve the problem. A light that's position keyframed driving the motion is what Particular has had and been their solution for years. Even their last update that added text/mask emitters does it in such a way that it creates a light layer in the background to achieve it.

Anyway, this won't work for me because the mask path is dynamically generated using expressions. Specifically, a shape layer created by 'Connect Layers Pro' between two nulls (that are wiggling or animating in some way).

I want the particles to shoot along this dynamic path, but considering it's variability in size and length I'm not sure how to do this.
1) As far as I know, I don't think there's a way to have a light layer with position keyframes dynamically generated via an expression. I'm not sure that would even make sense.
2) I can use the method I'm using now using a mask emitter and give it speed along the path, but somehow I need to dynamically calculate the life of the particle so that it dies before it hits the end of the path and wraps around to the beginning again.

So I was thinking.... ok that maybe possible. Perhaps I can calculate the total length of the path, do some testing to figure out how fast the 'speed over path' really is in pixels, and create the algorithm to dynamically calculate the particles life based on the length of the path and the 'speed along path' property.
I found an old post Dan Ebbert's responded to that seemed close to what I'm after: https://forums.creativecow.net/thread/227/39596.


I hope someone wouldn't mind giving me a sanity check on this one. I feel like I'm making this harder than it needs to be.

Thanks I really appreciate it!
Will





© CreativeCOW.net