Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity › Forums › Adobe After Effects Expressions › Randomised end point

  • Randomised end point

    Posted by Dillan Stock on October 7, 2015 at 4:21 pm

    I have had a look for an answer, but couldn’t find something that did what I am after.

    I have approximately 100 layers, all of which I need to animate flying towards the screen and ‘past’ the viewer.

    Im doing this by increasing the scale from %0 and changing the x and y coordinates.

    I need to put together and expression that randomises the end point of each layer’s movement by changing the x and y value to a number within certain parameters.

    The start point is the same for every layer.

    Any suggestions as to the best way to do this?

    Everything I have tried has changed the start point as well as the end point.

    Kalleheikki Kannisto replied 10 years, 11 months ago 2 Members · 1 Reply
  • 1 Reply
  • Kalleheikki Kannisto

    October 7, 2015 at 6:14 pm

    To make them look like they’re flying past the camera, you should make them 3D layers, not 2D layers that are scaling. Scaling 2D layers will make it look like they are slowing down as the scaling goes higher, whereas real motion towards camera in 3D is exponential, not linear in terms of scale. Although with 3D you will have to deal with the layers not being 0 scale in the beginning by fading them in.

    Several ways of making a random end point with a common beginning point. It’s not a big deal to do it manually either, as you can first have the layers starting at the same time and keyframe the beginning positions to be the same, then at another point in time keyframe them to be different and finally offset the layers.

    If you want to do it with expressions, you could use this for random X/Y position, (doesn’t affect Z, so you’d have to animate it or modify this accordingly):

    seedRandom(index, true);
    end_offset_x = random(250)-random(250);
    end_offset_y = random(250)-random(250);
    xy_offset=(time-startTime)*[end_offset_x,end_offset_y,0];
    value+xy_offset

    250 may not be the right value for you, you’ll have to see what works in your comp.

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