Copy link to clipboard
Copied
Hi There,
I want to import an Illustrator file containing over 100 layers (in this case, molecules all clustered in a ball) , and then animate the molecules/layers to "fly apart" and leave the screen.
I would be nice to use a slider so there can be some easing and delay between each layer/molecule.
I was looking this tutorial:
Infographic Expression Tutorial - YouTube
But not sure how to translate the shape and rotation shown into position
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:
wiggle(0,500)
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,
Copy link to clipboard
Copied
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:
wiggle(0,500)
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.
Copy link to clipboard
Copied
Thanks so much! .... this is perfect. Very clever.