Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Randomize

  • Posted by Christopher Rotter on May 7, 2008 at 11:39 pm

    Hello, I’m looking for a way to randomize a composition, as in say for example you have 4 circles (red,green,yellow,blue) now you want to randomize them either in X or in Y or in Z or in X,Y & Z if someone could help me on this.

    Simon Bonner replied 18 years ago 2 Members · 3 Replies
  • 3 Replies
  • Simon Bonner

    May 8, 2008 at 1:52 pm

    Search for ‘wiggle’ in AE help files. Or Aharon has some intro tutorials in the AE podcast section.

    Simon Bonner

    youtube.com/simonsaysFX

  • Christopher Rotter

    May 9, 2008 at 3:36 am

    The wiggle script does not do what I’m after as it seems to wiggles on all axis, I’m after to randomize layers within a composition

  • Simon Bonner

    May 9, 2008 at 10:38 am

    So you want to wiggle on just one dimension – x, y, or z? Or combinations of the three?

    You need to add an expression to the position property of the layer. In case you don’t know how to do that: select the layer in the timeline, hit P, hold down Alt and click on the stopwatch. A textbox will appear in the timeline. Into this box type:

    w = wiggle(2,25);
    [value[0],value[1],value[2]]

    The first line says to create a variable called w, and then add to this variable a wiggle that occurs 2 times a second and is 25 pixels in size.

    The second line says to define dimensions 0, 1 and 2 (which relate to x, y and z – you have to say 0 1 2 instead of x y z for some reason) as ‘value’. Value just means, use the property that existed before the expression was added. So if your x (or 0) value was 325, using value will leave it as 325.

    Seeing as 0, 1 and 2 are all defined as value, this expression won’t do anything! What you have to do once you’ve added it to your position property is exchange one or more of the ‘value’s with w. Then 0, 1 or 2 will wiggle according to the w.

    If you want two dimensions to wiggle in different ways (more / less frequently, more / less strongly), add more variables on the second and third lines, e.g.

    x = wiggle(2,25);
    y = wiggle(10,50);
    z = wiggle(3,300);
    [x[0],y[1],z[2]]

    Hope this is what you’re looking for.

    Simon Bonner

    youtube.com/simonsaysFX

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