Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Noob question: decimal points in random() expression

  • Noob question: decimal points in random() expression

    Posted by Ilias Papadopoulos on February 6, 2020 at 3:36 pm

    Hi all, I’m sure this is a very very basic question but I haven’t found any answer to this no matter where I look. I have the following expression that picks random numbers from minmax values:

    wiggle(random(1,2),random(20,100));

    but I want to be able and draw even smaller numbers, ie decimals, but when I write the following

    wiggle(random(.5,2),random(20,100));

    it simply doesn’t work. Also tried

    wiggle(random(0.5,2),random(20,100));

    It must be some sort of formatting/syntax problem, however I can’t find a simple definitive answer to that.

    Thanks

    Ilias Papadopoulos replied 6 years, 7 months ago 2 Members · 4 Replies
  • 4 Replies
  • Dan Ebberts

    February 6, 2020 at 4:57 pm

    What did you mean by this:

    “it simply doesn’t work”

    What were you expecting vs. what actually happened?

    Dan

  • Ilias Papadopoulos

    February 7, 2020 at 8:52 am

    OMG could it be that it works and it’s not doing what I expected from it? I expected smaller changes in motion as they are visible for example when adding wiggle on position and I go from

    wiggle(random(5,10),random(20,100));
    to
    wiggle(random(1,2),random(20,100));

    there’s a visible drop of change in motion, but when I go down to

    wiggle(random(.1, .5),random(20,100));

    then it shows no discernible difference. I expected it to be a lot less jerky with longer calm intervals. Maybe it doesn’t work that way?

  • Dan Ebberts

    February 7, 2020 at 2:16 pm

    In general, I think animating the wiggle frequency isn’t going to turn out the way you hope. For more info, see this:

    https://www.motionscript.com/articles/speed-control.html#wiggle

    I’m not sure what I’d recommend though…

    Dan

  • Ilias Papadopoulos

    February 10, 2020 at 8:35 am

    I see, thanks.

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