7 Replies Latest reply on Sep 16, 2016 4:23 PM by Petros_

    Instantiate a single animation at every vertex of a path in sequence

    Petros_ Level 1

      I've searched a bit with no luck. I have a path (A) that I've created (let's say) in Illustrator that has 100+ points placed in various places. It's a single, unclosed path. I've also got a simple animation (B) of a small dot popping up (through scale) and then disappearing (through opacity) pre-composed within the main composition. I would like to have 100+ instances of the animation (B) appear at each vertex point on the path (A) in sequence. How would I do it?

       

      Right now I've got the animation (B) looping and tracing the path from one end to the other but that's not what I want. There's an Illustrator script that does something similar to what I'm thinking of (duplicate one object at the selected corners of another object). Is there a similar way to do this in After Effects without manually placing the animation at each point? Maybe through scripting? Thanks in advance for your help.

       

      Pete

        • 1. Re: Instantiate a single animation at every vertex of a path in sequence
          Mylenium Most Valuable Participant

          You could do this with the Plexus plug-in's Path generator and using your animation as a custom sprite texture in place of the standard dots. Similarly other particle plug-ins liek Particular could probably be used to "drop" a dot at every waypoint. Expressions could do it as well, though only if you paste the path as a motion path, since masks and shape layers are inaccessible. Still, you could always check AEScripts.com for something along those lines. Maybe someone already has something suitable. Impossible to keep track of this all the time.

           

          Mylenium

          1 person found this helpful
          • 2. Re: Instantiate a single animation at every vertex of a path in sequence
            Roei Tzoref Adobe Community Professional

            you can do that using mask avenger script: BAO Mask Avenger 2 - aescripts + aeplugins - aescripts.com  that lets you access vertices position information. I tested it out. here is the breakdown:

             

            1. I have this path in illustrator. 48 vertices

            2. copy pasting it to a solid. now I have a mask

            3. use the Mask_Avenger effect and add the path via toggle window inside the effect under mask path. now I have a point for each vertex

            4. I use the handy "Create Null Controllers" to create a null at each point. now I have handy nulls

            5. since the default location of the null is at 0,0 (left upper corner) and size 100x100 px, I change all the nulls to 50,50 anchor point so they will be centered in the

            location of the points

            6. select all the nulls and the Dot precomp in the project window and replace them via shortcut Ctrl+Alt+/. set the opacity to 100% and scale to 100% (for some reason nulls generated by the latest version are at 50%)

            dots.gif

             

            I don't need the script or the path or the parenting to the mask layer. obviously, this script is much more powerful and is only used briefly here for the task of placing object in the vertices position.

            1 person found this helpful
            • 3. Re: Instantiate a single animation at every vertex of a path in sequence
              Rick Gerard Adobe Community Professional & MVP
              1. Add a new layer to your composition
              2. Use the pen tool to draw a path with as many points as you like or /
              3. Copy the path you want to use in Illustrator in illustrator providing all of the points you want to use are on a vertex and paste that path to a new mask path in After Effects
              4. Press Alt/Option + m then Ctrl/Cmnd + c to set a mask keyframe and copy it
              5. Add the animated comp of your small dot making sure that the animated dot the first layer and is in the exact center of the comp or/
              6. Add a circle shape layer to the center of the comp and animate the scale and opacity
              7. With the shape layer or the comp selected press Alt/Option + p and then Ctrl/Cmnd + v to paste the mask path you copied to the position property of your animated layer
              8. The animation will now follow the mask path perfectly so add the following expression to the position property of the animated dot layer
                position.valueAtTime(key(index).time);
              9. Duplicate the animated dot layer as many times as you need to
              10. Set an out point for all of the animated dot layers where the opacity fades out and then sequence the layers using the keyframe assistant

              Done... No scripts, no problems.

               

              Give me a few minutes and I'll show you how it's done.

              1 person found this helpful
              • 4. Re: Instantiate a single animation at every vertex of a path in sequence
                Petros_ Level 1

                Wow, thank you guys for the thoughtful responses! I'm frequently amazed at the generosity of people like you. I'm temporarily on to some other things, but when I get a chance to circle back and do this I'll try to check back in here and let you know what I tried and what worked. Thanks again!

                 

                Peter

                • 5. Re: Instantiate a single animation at every vertex of a path in sequence
                  Rick Gerard Adobe Community Professional & MVP

                  Here's a tutorial I whipped out.

                  1 person found this helpful
                  • 6. Re: Instantiate a single animation at every vertex of a path in sequence
                    Petros_ Level 1

                    Rick, this is amazing! Thanks so much for the time you put into it! This is pretty much exactly what I was trying to learn, and your tutorial explains it super-simply.

                     

                    Peter

                    • 7. Re: Instantiate a single animation at every vertex of a path in sequence
                      Petros_ Level 1

                      Yep, tried it out and this worked great for me. Thanks again!