Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Random Distribution on Z axis

  • Random Distribution on Z axis

    Posted by Doug Suiter on May 30, 2006 at 12:33 am

    Hi all – I am a smie-skilled After Effects user with much to learn.
    I am wondering if there is a way to randomly distribute several layers along a Z-axis in a 3-d comp?

    I could do it manually of course – but it seems to something that I want to do quite frequently and it would be a really handy thing to know.

    Thanks,

    Doug_

    http://www.sydneyfcp.info

    Colin Braley replied 19 years, 11 months ago 2 Members · 3 Replies
  • 3 Replies
  • Colin Braley

    May 30, 2006 at 1:06 am

    Add this expression to position:

    minZ = -2000;//Minimum z depth value
    maxZ = 2000;//Maximum z depth value
    //–
    seedRandom(index, true);
    z = random(minZ, maxZ);
    [position[0], position[1], Math.round( z )]

    You can then adjust the x and y components of the position like normal, but the z value is randomly chosen by the expression.

    ~Colin

  • Doug Suiter

    May 30, 2006 at 1:07 am

    Thank you so much!

  • Colin Braley

    May 30, 2006 at 1:31 am

    you’re welcome

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