0
$\begingroup$

I'm trying to animate a spotlight (position, orientation) along a curve. The animation is 50 frames. @frame 0, I want the spotlight to be at the curve beginning. @frame 50, I want the spotlight to be at the end of the curve.

The spotlight is created at the world origin. I have a null target at 0,0,0. I have an axis that is constrained to the curve. I parent the spotlight to the axis, and at frame 0 and 50, it looks good when scrubbing the timeline.

However - when I assign a keyframe to frame 0 instead of just moving thru the timeline, the spotlight suddenly jumps away from the parent and curve. At frame 50, it's nowhere near the desired location.

curve animation with parent, target constraints on light

So the big mystery for me is why does it seem to work without keyframes, and why/how does adding keyframes create the offset/problem?

If I don't get fancy and just add object constraint to the light, follow path, it behaves in a similar fashion; at frame 0, it is located at the start of the curve, at 50, the end of the curve. Assigning a keyframe at frame 0 looks OK, but going to frame 50 introduces an offset, then moving to frame 0 creates an even bigger offset and it is no longer at the position it was when I added the keyframe!

simple curve constraint, no parent or target

It seems evident that an offset gets introduced, but I'm not sure how to correct the offset but still have the object constrained to a curve. Suggestions to correct this welcome! Thanks!

$\endgroup$
1
  • $\begingroup$ Assign the keyframes to the Path's Path Animation > Evaluation Time, not to the spotlight's location and rotation. $\endgroup$
    – John Eason
    Commented Aug 3, 2023 at 21:59

1 Answer 1

0
$\begingroup$

Thanks very much for the suggestion John. I couldn't find that attribute so.. I just poked at it some more.

I added an Object Constraint to my light (Follow Path), then hovered over the offset field and Rt-clicked to insert keyframe at frame 0, then the same at frame 50. Now the light follows the path correctly, with keyframes. This was a suggestion from ChatGPT (after a bogus response).

Then I added another constraint to the light to Track To (the object of interest in the scene), et voila, it 'works'!

I did try the path animation example from the manual, and that worked OK too.

Cheers!

$\endgroup$
1
  • $\begingroup$ Apparently another bit I was missing was to Clear Origin on the light after parenting it, that would likely have corrected the keyframe offset.. just a thought. $\endgroup$
    – shawn
    Commented Aug 4, 2023 at 14:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .