Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Can I smooth out the movement of a parented layer?

  • Can I smooth out the movement of a parented layer?

    Posted by Quentin Vermeersch on May 14, 2024 at 2:10 pm

    I’m using geolayers 3 and I’m animating a road from a town to another. I have a car element following the road, using the trace path function, linked to the trim path.

    The car element has a very bumpy movement, and I would like to know if someone knows a solution to smooth out its motion, while still being parented to the bumpy road generated by Geoloayers? To have it roughly following the road, but smoothing it out

    Here is my project
    https://imgur.com/a/Rhdv91H

    Brie Clayton replied 2 years, 2 months ago 3 Members · 6 Replies
  • 6 Replies
  • Dan Ebberts

    May 14, 2024 at 2:26 pm

    How is the car linked to the path now?

  • Quentin Vermeersch

    May 14, 2024 at 2:29 pm

    I’m using Trace path on the path, which generated a null. The car is pick whipped to the null

  • Dan Ebberts

    May 14, 2024 at 3:51 pm

    It seems like you should be able to use smooth() to smooth out the parent’s rotation and position, subtract the parent’s actual rotation and position from that to create a delta, which you would then add to the child’s position/rotation. So I would think it would look like this (although I didn’t find any smooth parameters that worked very well):

    d = parent.position.smooth(.5,10) - parent.position;
    value + d;
  • Dan Ebberts

    May 14, 2024 at 4:07 pm

    A better idea might be to un-parent the car from the null and just use smooth() expressions to link the position and rotation to the null’s values.

  • Quentin Vermeersch

    May 15, 2024 at 7:26 am

    Thank you Dan, it worked a charm! I indeed managed a better result with your second option, breaking the parent relation and using this code one the Pin layer position

    thisComp.layer(“ROUTE”).position.smooth(0.1,29)

  • Brie Clayton

    May 15, 2024 at 3:35 pm

    Thank you for your solve, Dan!

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