18 Replies Latest reply on Oct 6, 2015 5:28 AM by Liran Tabib

    Arrow Animation

    fhxfhx Level 1

      Hi, is there a way to give stroke an arrowhead or whatever, that is bond to the start or end and follows the “normal” orientation of the path. Don’t know if AE has a normal on the path. Something like an expression or so ? Didn’t find a tut online that would solve this.

       

      Regards,

      Frank

        • 2. Re: Arrow Animation
          Rick Gerard Adobe Community Professional & MVP

          It's a simple matter of using a mask path for a stroke, selecting the mask path in the timeline not in the composition window, copying the mask path (Crtl/Cmnd + C), then selecting the position property of the arrowhead and selecting edit>paste (Ctrl/Cmnd + V). The trick is the placement of the Anchor Point on the arrowhead and the timing of the start and end points of stroke.

           

          Here's a sample project for you to take a look at. I've also added an expression that makes a feather layer follow the position of the arrowhead behind the arrow head. The length of the stroke is controled by a slider. The idea is to precompose your arrow layers then use time remapping to control timing and avoid the orientation jumps that happen at the first and last frames of the movement. Also, if you set your starting keyframe for stroke anywhere but at the first frame you'll have to adjust the offSet value to put the feathers at the end of the arrow.

           

          Screen Shot 2011-12-03 at 8.37.38 AM.png

          • 3. Re: Arrow Animation
            fhxfhx Level 1

            whow that's great Rick, did you program this huge expression ?

            • 4. Re: Arrow Animation
              fhxfhx Level 1

              leaning on the many "to be elaborated" solutions for animated arrows, like also here http://forums.adobe.com/message/2057102#2057102#2057102

               

              Rick I think your solution must be implemented as an AE function or plugin or effect ... I mean animated arrows, guys, ... "dah" is a reqiuirement for a practice-oriented animation software ...

               

              I brought the stroke length to 0 and had an inflexible arrow now ... great for non-elastic arrow animation ... shape can be drawn as wanted ... has everything in it Rick.

               

              Really cool.

              • 5. Re: Arrow Animation
                Rick Gerard Adobe Community Professional & MVP

                The expression is my creation. It's actually prety simple once you understand the functions. I never bothered to automate the offset if you choose to start keyframing the stroke at something other than the first frame. The math was odd and not linear.

                 

                All the expression does is look at the position of the point and make the feathers follow at the right time by calculating the difference between the start and end position of the stroke as a function of time. The only really tricky part of the expression was creating the if statement to stop the feathers from moving when the point stoped based on the last keyframe's time. There's also a bug that I may fix some day that causes the point and the feathers to shift orientation on the last frame where they are moving. If I get ambitious I'll write an expression that adjusts orientation to the path because the automatic orient to path always breaks on the last frame of an animation.

                 

                Sorry if that explanation doesn't make any sense, I've been up for nearly 20 hours.

                • 6. Re: Arrow Animation
                  fhxfhx Level 1

                  thx Rick, this is a great post for arrow ani searchers.

                  • 7. Re: Arrow Animation
                    fhxfhx Level 1

                    how do you get the orientation of the arrow head aligned to the path ? and the same timing for moving ? was trying to figure out, but what ever i tried it didn't work yet.

                     

                    Thx,

                    Frank

                    • 8. Re: Arrow Animation
                      Rick Gerard Adobe Community Professional & MVP

                      You must set the arrow to auto orient to path. The arrowhead is drawn horizontally with the tip to the right. Then, with the Arrowhead layer selected you can Right Click or press Ctrl/Cmnd + Alt/Option + O or use the menu and go to Layer>Transform>Auto-Orient and select Orient Along Path.

                       

                       

                      Screen Shot 2011-12-11 at 5.41.01 AM.png

                       

                      Select Orient Along Path and click OK and the arrowhead will now point in the right direction. Auto-Orientation is a powerful feature. It's part of the basics that everyone using AE shold know.

                      • 9. Re: Arrow Animation
                        fhxfhx Level 1

                        Thx Rick, now I understand, the arrow stroke and the head and tail are basically independent animations, just that the position path is copied from one to another and the animation timing then is adjusted by hand. Because when I tried to copy the stroke's end-%-animation to the head's position-animation, it said it can't do that, so I adjusted by hand. Just to continue the good example that is stated in this post with probably add useful stuff, is there a way to interconnect the stroke-end-%-ani by expression to the head-position-ani, so changing the timing on the stroke, would carry on to the head-position ?

                        • 10. Re: Arrow Animation
                          Rick Gerard Adobe Community Professional & MVP

                          Did you download the sample project?

                          fhxfhx wrote:

                           

                          Thx Rick, now I understand, the arrow stroke and the head and tail are basically independent animations, just that the position path is copied from one to another and the animation timing then is adjusted by hand.

                           

                          Nope. The position of the tail is controlled by an expression applied to the position property of the tail layer. You don't paste the path. The position of the tail is automatically controlled by the slider control on the stroked layer. Adjust the slider and the length of the stroke changes and the arrow stays attached to the end of the path.

                           

                          The path is only pasted to the position value of the arrowhead. It sounds like you had problems pasting the mask path to the arrowhead.

                           

                          To successfully paste a mask path to the position property you need to make sure that the path is selected. The easiest way to do this is to set a single keyframe for the mask, select that keyframe, copy, then set a single position keyframe for the arrowhead layer, select that keyframe and paste. This eliminates the possibility of a failure to match the motion path to the arrowhead.

                           

                          One other thing, before I forget, to make this work the layer you use for the path must be the same size as the composition and at 100% scale.

                           

                          Screen Shot 2011-12-11 at 9.34.56 AM.png

                          • 11. Re: Arrow Animation
                            fhxfhx Level 1

                            ok thx. Is it possible to also apply the position of the arrow-head with an expression that takes into account the end-% (distance) of the arrow-stroke as well, so then this would be a pure expression driven arrow, stroke-head-tail and 1 slider for length. That would also allow to have a growing arrow and the arrow-head stays attached. I know it works already with the copy method, but just for the beauty of purity with 1 arrow expression-set that carries it all.

                            Also it would be interesting, if this could be provided as am effect, so one could create a layer, apply the arrow-effect, tweak to needs and repeat. A one stop arrow-soultion that was missing in AE yet.

                            • 12. Re: Arrow Animation
                              Rick Gerard Adobe Community Professional & MVP

                              It's not possible to tie motion to a mask path with an expression. You'd have to copy and paste the path to something.

                               

                              It would be easy to apply make a couple of animation presets to apply the expressions to the tail and to the path layer. You'd just need to keep layer naming conventions. It would also be fairly easy to write a script that would do the whole thing for you.

                              • 13. Re: Arrow Animation
                                fhxfhx Level 1

                                trying to understand the difference of the arrow-tail and the arrow-head. While the tail is tied to the arrow-stroke per expression, the head can't be tied this way, ok. Can you provide such a script for the community ... probably most AE users don't go that deep to start scripting ... I actually do some scripting but a) it takes long, b) i have to give up about 50% of projects because I'm not knowledged enough when it comes to programming skills for functions etc. I tried to learn programming and did a lot of tests etc., but I don't use it often enough in real life, to remember how i did it before. so i registred i'm basically always trying re-inventing the wheel from scratch.

                                • 14. Re: Arrow Animation
                                  Rick Gerard Adobe Community Professional & MVP

                                  The tail is tied to the position of the arrowhead delayed by the time difference between the start and the end of the stroke.

                                   

                                  I'd suggest that you start a library of animation presets. Include some notes. That's what I do. Every time I build something that I think I'll use I save an animation preset and a sample project. That's where the arrowhead project came from. If you're ever going to make a living in graphic design you have to start building a library of your own templates.

                                   

                                  Here's a zip file with my presets for the arrow project. It's not a perfect way to keep track of things but it works for me.

                                  • 15. Re: Arrow Animation
                                    fhxfhx Level 1

                                    ya I lib stuff. Thx for .zip, I see you use a document to make notes, me too

                                    • 16. Re: Arrow Animation
                                      fhxfhx Level 1

                                      just for anybody who comes accross this post, searching for a quick explanation on how to create an arrow animation, I paste a little movie here to shorten up the process of knowing how ... enjoy

                                       

                                      here is the sample project file.

                                       

                                      1 person found this helpful
                                      • 17. Re: Arrow Animation
                                        modio Level 1

                                        This has been a pain point of mine for years!


                                        We've finally created a script for easily animating arrows in After Effects, called Easy Arrows. You can attach an arrow (or any shape) to a stroke with the click of a button:

                                        https://modio.tv/downloads/easy-arrows/


                                        This will save you many headaches.

                                        • 18. Re: Arrow Animation
                                          Liran Tabib Level 1

                                          Hi

                                          I've created a preset on creating animated arrows with a simple (double)

                                          click:

                                           

                                          http://www.vdodna.com/products/arrow-preset/

                                           

                                          you will find this easy and helpful