5 Replies Latest reply on Aug 18, 2008 7:07 AM by akribie

    Layer attached to end of animated stroke

    akribie Level 2
      I've an animated stroke on a shape layer drawing dotted lines over a map using Trim to animate the length of the stroke. Works as expected.

      I'd like to add something (vector graphic of vehicle or whatever)to the moving end of the stroke from another layer.

      Forum and web searches didn't turn up anything addressing this question.

      Grateful for hints on how to get something on another layer to follow the growing end of a stroke.

      AE CS3 under Win XP SP3
        • 1. Re: Layer attached to end of animated stroke
          A. Cobb Level 3
          There's no way to truly attach the layer. You can copy the path shape to a layer's motion path. In that case, you'll not only have to compensate for any transforms that have been applied to the layer and the shape contents, but also you will have to match the timing of the position to the Trim Paths animation.
          • 2. Re: Layer attached to end of animated stroke
            akribie Level 2
            Thanks, Aaron. I was afraid that would be the answer.

            I've not done much with expressions yet. Is there a route that way?
            • 3. Re: Layer attached to end of animated stroke
              A. Cobb Level 3
              >I've not done much with expressions yet. Is there a route that way?

              Not for actually attaching the layer, no. Scripting is the only way you could do that procedurally. Someone out there might have a script that does this sort of thing.

              Matching the animation could be done with expressions, I think. I'd have to actually sit down and do it to tell you how, since I haven't done this before, but I don't think it would be difficult. Of course, if your trim paths animation is constant-speed, you should just be able to stretch the position keyframes you pasted to match the duration of the Trim Paths animation (select all the keyframes, then option/alt-drag the first and/or last keyframe to match).

              Matching the transforms could also be done using expressions, nulls, and parenting. If you match the grouping structure of the shape layer contents using parented nulls (ultimately parented to the shape layer itself) you should be able to use the pick-whip to link the null transforms to the group transform properties of the shape layer.
              • 4. Re: Layer attached to end of animated stroke
                (Steve_Patterson) Level 1
                You could try motion tracking the end point of the line, and applying the tracking data to a null, or footage element, but your mileage will vary depending on what your stroke looks like, and what kind of transformations are occurring.
                • 5. Re: Layer attached to end of animated stroke
                  akribie Level 2
                  Thanks, Steve.

                  I get a reasonable track on the end of a solid stroke by winding down background opacity whilst tracking so the stroke really stands out. So far I haven't made it round all the sharp corners, but that is detail The principle looks very viable.

                  Thanks for the thought. Looks very promising.