Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Static random numbers

  • Static random numbers

    Posted by Hampus Lideborg on December 13, 2019 at 5:47 pm

    Hello!
    I’m currently setting up a project where I want to give the the objects just a random wiggle on the position and rotation. It’s stop motion so I’m posterizing the time on the wiggle to get a nice effect. However I want the values to shift just a tiny bit.

    Currently what I’m using is this

    posterizeTime(1.3)
    wiggle(2,5)

    But what I’d like to do is this

    x = random number between .8 - 1.5 that is static and gives me a new one everytime i copy/paste to a new layer
    y = random number between .5 - 2 that is static and gives me a new one everytime i copy/paste to a new layer
    z = random number between 2 - 5 that is static and gives me a new one everytime i copy/paste to a new layer

    posterizeTime(x)
    wiggle(y,z)

    So I really just want to simplify my workflow with not having to go in to each expression and change the values just a tiny bit to get a nice variation in the animation.

    Thanks!

    Hampus Lideborg replied 6 years, 8 months ago 2 Members · 3 Replies
  • 3 Replies
  • Andrei Popa

    December 13, 2019 at 6:32 pm

    Try this:

    seedRandom(index, false);
    x = random(0.8,1.5);
    y = random(0.5,2);
    z = random(2,5);
    posterizeTime(x);
    wiggle(y,z);

    Andrei
    My Envato portfolio.

  • Andrei Popa

    December 13, 2019 at 6:50 pm

    I’m sorry. You should pass true as an argument to seedRandom. So this should work:


    seedRandom(index, true);
    x = random(0.8,1.5);
    y = random(0.5,2);
    z = random(2,5);
    posterizeTime(x);
    wiggle(y,z);

    Andrei
    My Envato portfolio.

  • Hampus Lideborg

    December 16, 2019 at 3:30 pm

    This did it!
    Thank you so much!

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