ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Noob question: decimal points in random() expression

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Ilias Papadopoulos
Noob question: decimal points in random() expression
on Feb 6, 2020 at 3:36:52 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


Return to posts index

Dan Ebberts
Re: Noob question: decimal points in random() expression
on Feb 6, 2020 at 4:57:44 pm

What did you mean by this:

"it simply doesn't work"

What were you expecting vs. what actually happened?


Dan



Return to posts index

Ilias Papadopoulos
Re: Noob question: decimal points in random() expression
on Feb 7, 2020 at 8:52:18 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?


Return to posts index


Dan Ebberts
Re: Noob question: decimal points in random() expression
on Feb 7, 2020 at 2:16:14 pm

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

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

I'm not sure what I'd recommend though...


Dan



Return to posts index

Ilias Papadopoulos
Re: Noob question: decimal points in random() expression
on Feb 10, 2020 at 8:35:10 am

I see, thanks.


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2020 CreativeCOW.net All Rights Reserved
[TOP]