To place the layers randomly, you can use wiggle. If you set the frequency to 0, it will not move at all and only create a constant offset
shift layer up to 500px in a random direction:
To slowly move into this position, you can use a linear expression connected to a slider
var slider = thisComp.layer("Null 1").effect("Slider Control")("Slider"); // pick-whip slider here var endPosition = wiggle(0,500); // or use any other method to calculate the desired final location linear(slider, 0,100,value, endPosition)
There is also an alternative that requires no reading or writing of expressions code at all, with my extension iExpressions.
Just apply the Basic Wiggle iExpression to the layers, set the frequency to 0 and link the amplitude to a slider.
With the wiggle approach some layers will always stay close to the center (since the offset is randomly, hence also sometimes small). If you don't want that, you can also use the Distribute 2D Circle and Spiral iExpression. By default, it will place the layers in a circle, but it also has wiggle controls (whose frequency you can set to 0) to add some randomness on top of the circle placement to get a more random placement around the original start position. Simply link both the circle radius and the wiggle amplitude to two separate sliders to control the movement.
Thanks so much! .... this is perfect. Very clever.