9 Replies Latest reply on Apr 28, 2009 4:08 AM by Ramon0

    Following a Vector Path, by Expression or Something...

    Ramon0

      Hello, how do you know how could I get a null or any other object to follow a vector or mask path? Cause this is a feature that I tend touse all the time in other apps but I don't know how to do it in after effects... I suppose some expression will be necessary to make object follow the spline and be aligned accordly, isn't? I'm sure this is a very basic issue and lots of examples must exist out there, but I've not able to find any at this time, so... THANKS in advance for any clue!

        • 1. Re: Following a Vector Path, by Expression or Something...
          TimeRemapper Level 4

          If you have a mask shape (path) drawn, set a keyframe for the Mask Shape.

          Copy that keyframe.

           

          Select the "Position" parameter in the timeline of the layer (null) you want to animate.

          Paste.

          1 person found this helpful
          • 2. Re: Following a Vector Path, by Expression or Something...
            Ramon0 Level 1

            ...D'oh! Is it that simple?? And... doing that, I'll get my objects following the spline path length as I tried to explain? But what kind of control I'll have about the position (I mean percentage) of the object along the spline in this way? And how I'll get the object be aligned (rotated) in the expected way? Uf, a lot of re-questions, sorry... but I'm on work  right now and (sadly) not in front of the program... BTW, and if that finally works in the way I'd want (I HOPE!), I suppose that I'll be able to link that two parameters that you said by means of an expression to make it dynamic, isn't? Well, so I just can't wait to try it... THANKS for the quick help! I'll tell...

            • 3. Re: Following a Vector Path, by Expression or Something...
              Mylenium Most Valuable Participant
              But what kind of control I'll have about the position (I mean percentage) of the object along the spline in this way?

              You adjust the keyframe timing.

               

              And how I'll get the object be aligned (rotated) in the expected way?

               

              Layer --> Auto-Orient

               

              I suppose that I'll be able to link that two parameters that you said by means of an expression to make it dynamic, isn't?

              No. Expressions cannot read mask data. This is a copy&paste workflow only (but it works in both directions).

               

              Mylenium

              1 person found this helpful
              • 4. Re: Following a Vector Path, by Expression or Something...
                Ramon0 Level 1

                O.K. I'll try all that! Hmmm... Sad to read that I can't constraint an objecto to a certain percentage position of a curve dynamically... Cause I think that's a very basic function with lots of posibilities talking about automation and more... Well, anyway I think I have enough material to experiment tonight and that's always fine for now , so... THANKS too!

                • 5. Re: Following a Vector Path, by Expression or Something...
                  Ramon0 Level 1

                  Well, I was trying it and it works in the way you say guys, aaalthough... I hoped some workaround could be done to link both parameters to update it dynamically, that is just what I need when I work with lots of constrained objects... It seems that expressions are able to read the curve data but the two values are incompatible, an array one and the other a... well, a "x, y, z" data, I don't remember how it's called... Really couldn't be a way to take advantage of all that array info to be used it for this kind of pourposes? It's only that with all this I'm having the feeling that expresions are very limited in managing and converting data, isn't? And well, I think some tools sould be provided to make up for this lack, or... am I maybe searching in the wrong place and I should asking if scripting could help in some other way? I mean, giving some acces to the array or, at least, copying & pasting that keyframes at every frame to update it in real time, I'm really not sure cause I have not idea of scripting... but I suppose it could provide this last kind of control cause this interface automation tasks is for what it's intended to be used, isn't? Well, thanks again cause both have teach me some usefull stuff that I'm sure I'll take advantage for this (maybe) or other pourposes!

                  • 6. Re: Following a Vector Path, by Expression or Something...
                    Mylenium Most Valuable Participant

                    I'm still not sure what you are trying to say. Expressions can modify the property stream they are applied to (i.e. the numerical value or a text string), if the data structure for that stream is accessible. That is not the case for mask data, as a keyframe always stores the information for all elements belonging to a mask, not just a single point or something. Scripts cannot circumvent that limitation, either, they always need to read and rewrite all mask data, even if only a single point changes its position. And then of course scripts are not interactive outside manually programmed loop callbacks... For your other issues - You are possible simply going about this the wrong way. If a path is a position property, it's absolutely possible to reference it in any way you fancy, derive it's length, modify its keyframing behavior. You can even use it to "draw", if you use Write-On or Particular to create strokes instead of tools that reference the masks on a layer... It's just not clear what exactly you need.

                     

                    Mylenium

                    • 7. Re: Following a Vector Path, by Expression or Something...
                      Ramon0 Level 1

                      Hello, that I need is basically to be able to attach some other vector elements to a different percentage positions of a main curve to get more compex shapes and they still can be animated easily, I mean, animating the main curve and getting that all that attached elements to folow it automatically...

                       

                      I don't want to compare, cause they are different (animation nevertheless) apps, but I do it all the time in other ones like Animation:Master, Cinema 4D... and I think all 2D vector animation the programs I have to used have some feature like this, or at least enough control over scripting to get it for your own. I think that would be very candy/easy if you could dynamically attach a motion path to a curve path or something, but it seems that's not possible in After Effects that is what I was reffering with "lack", as you say there are lots of posibilities working with motion paths but very limited posibilities with curve paths that is what I need, and as much as I like the program, I can'd avoid to feel some "rage" for it...

                       

                      Anyway, are you saying that I can't neither automate the keyframe "Copy & Paste" process by scripting to get it to work in real time? I mean, scripts can't be executed every frame if needed? Cause if that could be possible, I'd have some hope to get a workaround for get that I want when I be working with lots of attached elements at least... Thanks.

                      • 8. Re: Following a Vector Path, by Expression or Something...
                        Mylenium Most Valuable Participant

                        I'm afraid you're still stuck with the original issue. Once a shape has been converted to a motion path, a lot is possible, but not as a mask. E.g. one can get things to grow with valueAtTime() expressions or by integrating the path length and associating it with a percentage... Of course it doesn't change the fact that AE's inability to use masks more flexibly makes ones toe nails curl, but that's just the way it is. For the time being, we will have to live with it and use workarounds, which, given that you have C4D, is probably only a minor trouble. And yeah, scripts are modal and terminate whenever they are finished or you click inside an AE panel, so no joy on that end, either.

                         

                        Mylenium

                        • 9. Re: Following a Vector Path, by Expression or Something...
                          Ramon0 Level 1

                          Well, thank you very much, a pity I can't get it directly but now all seems much more clear at least...Now I think I should make a feature request and forget it for a time. Anyway I have learned some usefull things as I said and that's a good thing, BYE!

                           

                          PS: Hmmm... Now I wonder if I should mark my post as "Answered"