Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions stabilize expression for average of multiple trackers

  • stabilize expression for average of multiple trackers

    Posted by Andrew Shanks on May 22, 2005 at 10:41 pm

    Hi Guys,
    have got a real nasty shot I’m trying to stabilize, I have used an expression trick in the past to average a couple of trackers and apply the result to a layer, I was wondering if anyone has a way of doing the same thing for stabilizing (I’m guessing same thing as with tracking but using the anchorpoint rather than the position, but am a bit fuzzy about how to go about it).

    Cheers,

    andrew

    Andrew Shanks replied 20 years, 11 months ago 2 Members · 3 Replies
  • 3 Replies
  • Colin Braley

    May 22, 2005 at 11:06 pm

    Try something like this as an expression for anchor point on the layer you want to stabilize:

    apOne = (pick whip to your first stabilizer here);
    apTwo = (pick whip to your second stabilizer here);
    apThree = (pick whip to your third stabilizer here);

    numberOfStabilizers = 3;

    finalAnchorPoint = (apTwo + apOne + apThree)/numberOfStabilizers;
    finalAnchorPoint

    If you have more than 3 stabilizers just follow the same pattern but be sure to increase the value of the numberOfStabilizers variable

    ~Colin

  • Colin Braley

    May 22, 2005 at 11:20 pm

    Also, to make this easier you could try this expression for anchorPoint:

    //expression begins

    apArr = [ _____,_____,_____,_____];

    numOfStabilizers = 0;
    x = 0;
    y = 0;

    for(i = 0; i <= apArr.length; i++) { numOfStabilizers++; x += apArr[0][0]; y += apArr[0][1]; } [x,y]/numOfStabilizers //end This one takes care of all the math for you and all you have to do is highlight the underscores and pick whip them to your stabilizers. This expression would probably be easier to use than the first one I wrote for you. ~Colin

  • Andrew Shanks

    May 22, 2005 at 11:26 pm

    Thanks Colin!
    works a treat, thanks for that!!

    cheers,

    andrew

    🙂

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