I want to randomly position objects using the expression wiggle(.05,thisComp.layer("Null 1").effect("Slider Control")("Slider"))
linked to a null object slider so that at the end of the sequence I can pull all the objects back to the starting point.
I want the objects to pop up in their random positions at the start of the sequence, wiggle, and start to move around. Then I want to use Newton 2 to connect the objects with lines and then finally pull them all together into one object at the starting point.
I can get the objects to start in random positions and remain static by setting the wiggle to .00. I thought that if I precomped the objects and duplicated it, then I could set the wiggle expressions to .05 in the new comp to start movement. But changing the wiggle expression value also changes the start positions so it won't match up with the static start positions.
Is there a way to make a comp using the wiggle expression value of .05 (i.e. the objects in motion) and then copy the comp, remove the objects' position expressions but retain the objects' position values that the expressions generate?
After more research and experimentation I figured out how to do it.
I used the expression wiggle(thisComp.layer("Null 2").effect("speed")("Slider")/10,thisComp.layer("Null 2").effect("Position")("Slider"))
to set up the original random motion of the objects. I used two sliders referenced to the layers to get different speeds and origins.
I then duplicated the comp. The first comp I called motion, and the duplicate I called static.
In the static comp I converted all of the expressions to keyframes (Animation/Keyframe assistant) and then deleted all the key frames and the expression. I was left with a static comp with all of my shapes in the start position of the motion comp.
I then keyframed the scale of the objects in the static comp from 0 to 100 adding an inertial bounce and staggered the layers so they came up one at time. I also added a new wiggle expression to the static objects to they would shiver at the very end of the comp.
I put the static comp at the beginning of my sequence and the motion comp just after it so now the shapes pop in, bounce a bit then shiver and start to move around randomly. At the end of the motion comp I used the slider to pull all of the shapes back to a single position.