Let's eliminate the obvious: you didn't alter the null's Anchor Point, correct?
Thanks for the quick reply .
No, the anchor point has not been altered. The null follows the path position precisely, just not at the same speed as the transition of the stroke End property from 0 to 100%.
The end goal is to use the position data (which is currently being tested on a null) to drive the position of a layer, which could be an image of a paint brush or pencil, so that it looks like it is painting the brush stroke.
Oh, duh! Now I forgot the obvious! If you used a Mask Path to make the line, you're in luck. Make a keyframe for the mask path, then copy. Paste it into the null's position property and match up the beginning & ending keyframes the the 0% & 100% brush keyframes. It ought to work.
Press u to reveal the keyframes and adjust the timing.
That was my thought too, but it seems that while the roaming keyframes match up to the position of each vertex on the path, they don't match up in time to the brush stroke transition along the same path.
With a brush stroke that has only a few vertices like the example above I could take on Rick's suggestion to move they keyframes around (I'd have to change them from roaming to regular keyframes) so that each position keyframe matches the timing of the stroke writing on. Ideally I'd like to know how 0-100% on the End property is being processed so that this doesn't have to be done manually (it doesn't seem to be percentage of total stroke length).
You are simply ignoring that spatial and temporal interpolation are separate for some transform operations. It behaves correctly and predictably, you just haven't set both parameters to be linear.
What I am particularly interested in is how the percentage relates to the distance along the path. I thought I'd do another test, and in this example (see GIF) I have drawn two brush strokes, each with the same number of vertices (5) and proportionately identical apart from the scale. Each segment is (as close as done by hand) of equal length, so the shape should theoretically be 4 equal segments, accounting for 25% of the stroke.
Animating the End property over 4 seconds for both strokes (and I have added pauses with a Time remap for effect), demonstrates that the line does not animate on linearly. Most perplexing is that these very similar shapes animate from start to end quite differently. I would like to know how the percentage translates to stroke length.
I'll keep trialling and testing and report back if I figure it out. Was hoping someone might have encountered this before, or maybe wrote the code behind the Paint Effect.
Just copied one of the Brush stroke paths to a Mask and applied the Stroke Effect. The Stroke Effect animates from 0 to 100% as you would expect, meeting each vertex at the 25%, 50% and 75% markers. I'll keep digging.
The only way to reproduce your problem is to set only 2 keyframes use easing or adjust the timing in the graph editor. Set keyframes for 25% 50% 75% and 100% and the problem goes away. Here's my project.
The distance is exactly linear and based on the length of the stroke, not any bezier handles on the paths. Time is dependant on temporal, not spatial interpretation between the keyframes.
BTW, you can turn on grid or guides and turn on snapp to and make things exact. That's what I did.
Thanks so much for putting this project together Rick.
I must admit, my first reaction was, "No wait, I'm using the Paint Effect, not the Stroke Effect" but when I started copying paths from the Masks in your project file to a new instance of the Paint Effect (shamefully to prove my point), I couldn't replicate the problem either!
So I copied your path to Illustrator and my path to Illustrator to compare. I dare say that snap-to-grid would have saved me much stress, as it appears that my Paint stroke had two vertices in the same place at the starting point. This appears to have thrown out the stroke length measurement or at least the percentage thereof. Removing the extra point fixed the timing of my own hand-drawn path.
I'm going to see if I can apply what I have learnt here to my script, but I'd like to keep this thread going as I'm sure I'll have some more examples of oversight to run by you again :-)