Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions stabilize translation using expression

  • stabilize translation using expression

    Posted by Juergen Schuette on October 30, 2011 at 10:41 pm

    hello

    i’ve tracked an object using mocha pro (only tracked translation nothing else), what i’m trying to accomplish is to keep said object in the middle of the screen, actually it’s the x axis i want to “stabilize”, the y axis is not of concern … (btw. it’s an actor walking from a to b, he doesn’t stay centred all the time)

    being a newbie when it comes to ae i don’t know how to apply my tracking data to my videolayer … what expression should i use to keep the y axis in place? and how do i get the stabilization for the x axis done?

    thanks for your time

    juergen

    Juergen Schuette replied 14 years, 10 months ago 2 Members · 6 Replies
  • 6 Replies
  • Dan Ebberts

    October 30, 2011 at 11:40 pm

    In general, I think you could use something like this:


    trackData = motionTracker("Tracker 1")("Track Point 1").attachPoint;
    if (trackData.numKeys > 0){
    t0 = trackData.key(1).time;
    value + trackData.valueAtTime(t0) - trackData
    }else
    value

    You would point variable tackData to your tracking data (I used AE’s tracker). That should keep the tracked point at its initial location.

    Dan

  • Juergen Schuette

    October 31, 2011 at 12:56 am

    gee … to be honest i don’t understand a word of that code … i simply know nothing about expressions .. i only knew about the possibility to stabilize y axis using expressions cause some ae crack told me so years ago… 🙂

    i was hoping someone could walk me through all the necessary steps… might be too much to ask ..

    i’ve got my tracking data copied to the clipboard… not knowing where to put it and how to make the necessary changes to it…

    i’m sorry to ask that much… i’m just lost…

    thx juergen

  • Dan Ebberts

    October 31, 2011 at 1:46 am

    I’m not real familiar with Mocha. When you have your data on the clipboard, select your layer in After Effects, and do Edit > Paste, where does the data go?

    Dan

  • Juergen Schuette

    October 31, 2011 at 2:50 am

    depending on what i’ve tracked (translation/scale+rotation/shear/perspective) it affects anchor point/ position/ scale / rotation … i can paste it on whatever layer i want to… and as i’ve said before .. i’ve only tracked translation ..

  • Dan Ebberts

    October 31, 2011 at 3:34 am

    OK, so try pasting the tracking data onto a Null, and apply this expression on the Position property of the layer you want to stabilize:


    trackData = thisComp.layer("Null 1").transform.position;
    if (trackData.numKeys > 0){
    t0 = trackData.key(1).time;
    value + trackData.valueAtTime(t0) - trackData
    }else
    value

    Like I said, this isn’t really my area, so maybe someone else will chime in before I make a complete mess of it.

    Dan

  • Juergen Schuette

    October 31, 2011 at 4:10 am

    🙂 gonna try it first thing tomorrow.. thanks for your efforts .. dan..

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