Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects How to get a shape to follow the path of a dynamically changing sine wave,

  • How to get a shape to follow the path of a dynamically changing sine wave,

    Posted by Tim Tippets on May 1, 2023 at 10:22 pm

    Hi everyone,

    I’m using Wave Warp on a straight path to create a sine wave. I will change the sine wave height, length, etc over time and I would like a circle shape to follow the sine wave path as the height and length of the sine wave changes. Is it even possible using this method? Is there a better way?

    Thanks!

    Boston Cainfra replied 3 years, 2 months ago 3 Members · 4 Replies
  • 4 Replies
  • Filip Vandueren

    May 2, 2023 at 10:09 am

    Hey Tim, doing it from a wave warp would take some guess work, and the result isn’t as crisp
    so I would personally do it with a shapelayer.

    Here is a project that does a reasonable approximation of a sinewave with a rather minimal amount of points using expressions:

    https://imgur.com/a/IDkvv3o

    https://we.tl/t-blJaNBDZri

    View post on imgur.com

  • Tim Tippets

    May 4, 2023 at 1:31 am

    That’s amazing! I’d like my circle to go just one direction or the other along the line of the sine wave. I’m on mobile but will get back and dig in soon to look at the expressions to see if I can tell what’s causing it to move relative to what the sine wave is doing. I’m not an expressions guy but I’m guessing it won’t be to hard to tweak?

    Thank you a thousand times for giving me some direction to go in!

  • Filip Vandueren

    May 4, 2023 at 8:26 am

    Tim, I specifically did the Ball on a separate shape and let it calculate its own position on the sine wave (it’s actually a cosine wave, that made it easier to place the vertices on peaks an valleys), so the ball has an X-value you can manipulate.

    You could also use pointOnPath() to get a position that’s a certain % along the way of the wave-path, but if you do this, then the X-position could change if the wave changes shape, 13% along the course of the path isn’t necessarily at the same X-coördinate for different phases/amplitudes/wavelengths…

  • Boston Cainfra

    May 5, 2023 at 2:29 am

    Certainly, here is a summary of the steps:<div>
    </div><div>Create a new shape layer with the Shape Layer tool and choose Ellipse.</div><div>Position the circle shape at the start of the sine wave path.</div><div>Apply the Wave Warp effect to the shape layer with Effect > Distort > Wave Warp.</div><div>Set the Wave Type to Sine in the Wave Warp effect settings.</div><div>Adjust the Height, Width, and Frequency settings to match the sine wave path on the other layer.</div><div>Apply keyframes to the Height, Width, and Frequency settings over time to match changes to the sine wave path.</div><div>Adjust the Position of the shape layer to match the position of the sine wave path as it changes over time</div>

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