ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Automating Center Point Calculation

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Trevor Mowry
Automating Center Point Calculation
on Jun 26, 2019 at 10:13:19 pm

Bear with me here. I have a comp with two 3D nulls tracking two ends of a baton. I'm using particular to generate streaks on either end. I'm using the positional data of those two nulls to calculate their 3D center point.

After I calculate that center point, I define it as a variable and use it to further divide segment, calculating center points from two other center points and so on. I've manually written it out to 15 subdivisions but I feel like there should be a more efficient method of generating those points. Attached is what I have written so far. All individual streaks are different solid layers with Particular applied. The attached set of expressions is the same on every layer with adjusted arrays.

Thanks for any help!

Video Reference:
Expressions TXT:

Return to posts index

Kalleheikki Kannisto
Re: Automating Center Point Calculation
on Jun 28, 2019 at 6:37:34 am
Last Edited By Kalleheikki Kannisto on Jun 28, 2019 at 6:41:27 am

I think you can just make an expression which moves a single emitter from one end of the baton to the other within one frame (starting over at each frame with modulo) and emit the number of particles you want within that frame. You have to set particles' velocity from motion to zero. You probably need to adjust the "accuracy" (sorry I don't remember the actual name of the property) setting so that sub-frame positions are calculated correctly.

Kalleheikki Kannisto
Senior Graphic Designer

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2019 All Rights Reserved