Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Use markers to change camera POI with easing

  • Use markers to change camera POI with easing

    Posted by Reynolds Strother on February 19, 2008 at 10:44 pm

    I’ve been toying around with triggering the camera to look at different objects in space when a marker cues it to do so.

    I’ve succeeded at getting the POI to change with the marker by giving the marker comment and the layer the same name. This allowed the expression to retrieve a position for the POI to recognize.

    Now I’m trying to get eased interpolation from one point to the next. My logic for this effect is getting a time value between the current marker and the upcoming marker. Then use the difference between the current time and the upcoming markers time to create a percentage of progress between the markers.

    markerOne.time – MarkerTwo.time = x
    markerTwo.time – current.time = y
    y / x = %

    This would allow me to have values for an interpolation expression. (%,psoition1,position2)… Right?

    I can’t get my code to fit this logic. Could someone tell me if the logic is wrong or what code it takes to achieve this interpolation.

    Dan Ebberts
    replied 18 years, 2 months ago
    2 Members · 1 Reply
  • 1 Reply
  • Dan Ebberts

    February 20, 2008 at 12:33 am

    Sure, that should work. You just need the times of the previous marker (t1) and the next marker (t2), then your percentage is just (time – t1)/(t2 – t1). You need to watch out for situations like no markers, times before the first marker, times after the last marker and have code to handle those conditions.

    You might also want to consider having a fixed transition time – that is, you start easing from one POI to the next, say .5 seconds before the next marker. So you hold on one target for a while and the slide to the next one. Just a thought – it wouldn’t be much additional code.

    Come back if you get stuck.

    Dan

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