Skip to main content
Participant
October 9, 2015
Question

Is there an AE expression I can use to randomly exchange the positions of several equally sized layers?

  • October 9, 2015
  • 1 reply
  • 1659 views

Hi, I am a beginner in expressions in After Effects, I am working on an animation in which I have a small grid of images (each one on a separate layer) and I would like to have them randomly and quickly exchange positions while staying within the structure of the grid. I was able to use an expression to randomly turn them on and off but I would like to additionally have them exchange positions. This is beyond my capabilities. Does anyone have any suggestions on how to do this with an expression?

This topic has been closed for replies.

1 reply

Mathias Moehl
Community Expert
Community Expert
October 9, 2015

If you want them to move randomly on the grid you could

1) apply a wiggle expression to them to move randomly

2) bake the wiggle expression to keyframes

3) apply an expression that rounds the position to the nearest grid position (which effectively makes them jump from one grid cell to the next one.

I do something similar in chapter 3 of this video tutorial (in this case using iExpressions instead of normal expressions):

vlcsnap-2014-08-11-07h38m56s17.png?itok=QngoGp5X

Science Fiction User Interface with iExpressions | mamoworld

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects
Participant
October 12, 2015

yes, the cyclic grid element that you demo is almost exactly what I am talking about. you have outlined my problem nicely; I could keyframe the whole thing but it would be very tedious and allows very little room for experimentation unless I was willing to spend 100s of hours on it. I am looking at iExpressions on aescripts, it looks as though purchasing one of the bundles may be an affordable solution for some of the issues Ive been dealing with lately. thanks very much!