2 Replies Latest reply on Mar 5, 2018 7:12 AM by andrewdraws

    Move hundreds of shapes out from center

    andrewdraws Level 1

      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

        • 1. Re: Move hundreds of shapes out from center
          Mathias Moehl Adobe Community Professional

          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.

          • 2. Re: Move hundreds of shapes out from center
            andrewdraws Level 1

            Thanks so much! .... this is perfect. Very clever.