Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity › Forums › Adobe After Effects Expressions › Can This Be Done? Dup layer object with random expression?

  • Can This Be Done? Dup layer object with random expression?

    Posted by Megan Shea on March 1, 2010 at 5:26 am

    Does anyone know if this can be done? I need an object on a layer to be duplicated like 100 times randomly on the x axis. Maybe a little y random could help. But I dont know programming so much. Help!

    Dan Ebberts
    replied 16 years, 7 months ago
    2 Members · 1 Reply
  • 1 Reply
  • Dan Ebberts

    March 1, 2010 at 4:40 pm

    An expression can’t create new layers (you need a script for that) but if you apply an expression like this to a layer’s poisition property it (and each duplicate you make of the layer) will distribute itself randomly in the x direction. It’s easy to modify this expression to use a different range for x and to include some range for y as well, depending on exactly how you want it to work.

    seedRandom(index,true);
    x = random(0, thisComp.width);
    [x,value[1]]

    Dan

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