Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Automating Center Point Calculation

  • Automating Center Point Calculation

    Posted by Trevor Mowry on June 26, 2019 at 10:13 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: https://www.dropbox.com/s/pkzlkh7os9k1edb/Ex_Streak.mp4?dl=0
    Expressions TXT: https://www.dropbox.com/s/k44foxe86e7nnq1/Code.txt?dl=0

    Kalleheikki Kannisto replied 7 years, 1 month ago 2 Members · 1 Reply
  • 1 Reply
  • Kalleheikki Kannisto

    June 28, 2019 at 6:37 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

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