Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects expression advice

  • expression advice

    Posted by Guy on December 5, 2005 at 10:18 pm

    I have an expression to create a random wiggle on a 3D layer:

    seedRandom(13,true);
    wiggle(1,300)

    problem is, it is not smooth enough. I am using this layers postion to drive Particular’s emitter, and it creates “kinks” in the particles emitted.

    Changing the frequency (the #1 here) only slows the wiggle temporally.

    What I want are smoother, more gradual turns and curves.

    is there another line of code, or different expression that will give me wide, smooth curves?

    thanks!

    Ryan Hill replied 20 years, 4 months ago 3 Members · 3 Replies
  • 3 Replies
  • Ryan Hill

    December 6, 2005 at 12:20 am

    I thought there was a parameter in wiggle that handles this, but I can’t remember it off the top of my head.

    In the meantime, you could apply the regular wiggle to a null and then average the current position of the null with the position it was in a few frames ago.

    That will make the turns a little smoother, though not really curved. It would turn a square corner into an octagon, for example. If you want something closer to a curve, average a greater number of samples, and it will increase the number of “sides” to each turn. Also, increasing the time span between samples will dull the corners more.

  • Mylenium

    December 6, 2005 at 9:01 am

    You can try to use the .smooth method. I can’t recall exactly, since I rarely use it, but should be something like that:

    seedRandom(13,true);
    my_wiggle=wiggle(1,30);
    my_smooth=my_wiggle.smooth(5,10);

    [my_smooth]

    Mylenium

    [Pour Myl

  • Ryan Hill

    January 1, 2006 at 9:36 pm

    When I try it that way, I get “function smooth is undefined.”

    But I got it to work by applying the wiggle to a slider control and then apply the smooth to another expression pick-whipped to that.

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