4
$\begingroup$

I've got a straight line, with the origin at one end. I'd like to animate some rotation.

Here's the initial orientation:

enter image description here

Here's the final orientation:

enter image description here

With the initial an final rotations keyframed, here's the (linearly) interpolated path it takes:

enter image description here

I suppose this is because the rotation channels are interpolated independently from each other. Is there a way to animate this such that the line rotates directly from one orientation to the other, instead of following an arc?

Edit:

The key frames are rotation(0,0,0) to rotation(90,90,90). Here's the graph (all three lines on top of each other):

enter image description here

$\endgroup$
  • $\begingroup$ can you post an image of the curves in the Graph editor? $\endgroup$ – user1853 Apr 14 '16 at 15:34
  • $\begingroup$ Done. I think the root of the issue is that there are an infinite number of rotations that are equivalent in their end result, but differ in how they're interpolated. For example 90°==450°; these would look the same at the keyframes, but the latter's interpolated frames would do a full spin before arriving at the final position... Hurts my head a bit to think of 3 dimension interacting in this way.. $\endgroup$ – ajwood Apr 14 '16 at 15:51
  • $\begingroup$ can you upload the file? $\endgroup$ – user1853 Apr 14 '16 at 15:54
  • $\begingroup$ It seems to me that what you want to do is animate just the y axis form 0 to 90 instead of all 3. $\endgroup$ – user1853 Apr 14 '16 at 17:03
  • $\begingroup$ It looks like you're right for this example. Did you just arrive at that conclusion by intuition and/or trial and error? I don't suppose Blender can to such a "rotation simplification" internally; I'll need to figure out an external tool to do that. $\endgroup$ – ajwood Apr 14 '16 at 17:08
2
$\begingroup$

You are coming up with really strange interpolations because you're in Euler mode and encountering gimbal lock. Euler is notorious for gimbal lock problems, especially for animators who are unaware of how Euler rotations work. The best way to avoid this problem is to use quaternion rotation mode. You change the mode in the object transform properties. Quaternion math makes two orientations interpolate in the shortest path, meaning there is no flipping or spinning. You can think of this as "the shortest distance between two points is a line."

If you really, absolutely need to stick with Euler, the trick is to use as little rotation as possible to get the desired orientation. The Z axis will do most of the work in this case. Then tweak the X and Y values to get the final orientation.

Here are three tips to make working with this object much easier:

Work with the manipulator in gimbal mode. You can change this in your 3D view header or by pressing AltSpace. This mode gives a great visual cue to how the Euler rotations are compounding on each other.

Give the object a zeroed orientation aligned to the cardinal (global) axes. This will make it infinitely easier to visualize and predict what effect your rotation axes will have on the object. I generally point my objects to -Y or +X, but the choice is yours.

Lastly, play with rotation order. The default Euler order is XYZ, but the best mode is dependent on your scene. The mode to set it to is entirely arbitrary, but some work better than others for a particular scene. With the alignment in the last tip, my rotation order would remain XYZ. Then the only axes I would need to animate the object as I see in your scene would be Z and Y.

For another explanation, see my answer on this similar question.

enter image description here

$\endgroup$
0
$\begingroup$

You could use a armature parent bone to track an object on a path. The path could be straight or curved. Then you could control movement in either linear or not so linear fashion.

$\endgroup$
  • $\begingroup$ This seems like overkill for what I need.. Might have to use it if I can't come up with something better though $\endgroup$ – ajwood Apr 14 '16 at 17:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.