Please help me with this, I cannot get this to work properly in any way. I need the Z axis to be as shown but I simply cannot find any way to do what is a really really basic thing in Blender. I have read and read and read and seen all kinds of plugins and hacks/workarounds but please help me to move the global cursor to the right axis orientations or to make the animation use the Cursor axis and not the Global Axis. I can do this in every other piece of software in existence without any difficulty whatsoever, but this is like rocket science in Blender apparently.
This is just how Euler angles interpolate. Sometimes people call this “gimbal lock” but it’s not a great word for it-- it suggests that something is getting locked, and/or that it only happens at particular angles. I prefer to call it “wonky Euler interpolation” because it happens at almost all angles, and nothing ever gets locked.
One way to think about it is to imagine an airplane flying over a flat map. If the airplane was flying from latitude/longitude 0,0 to latitude/longitude 60,60, and they passed through 30,30 at the midpoint, and so on, that would be like Euler rotation. It would be a straight line on a flat map, but it wouldn’t be a straight line on the real globe. A real airplane doesn’t do that. It instead flies a great circle around the globe, and so appears to fly a curved line across our flat map.
The solutions involve changing the rotation mode of the object (in properties/object/transform.) One solution is to use quaternion interpolation instead of Euler interpolation, because unlike Eulers, quaternion rotations interpolate in great circles, like an airplane would fly.
If you’d rather use Euler angles, you can, for the example you’re showing. The first axis of Blender’s Euler angles are independent of the others. If you have an XYZ Euler, without any Y or Z rotation, you can rotate any amount in X without any problem: like flying around the equator, it’s a straight line on both the flat map and the spherical globe. So you can either adjust your axes so that your desired rotation is in X, or you can change your Euler order (probably, to something like ZXY.)
You can also use axis angle rotation for single axis rotation like this, although I think people rarely do that.
Your actual orientation for the rotation doesn’t matter. It’s all about the interpolation between the two keyframes you made. Other software is likely to default to quaternion interpolation rather than Euler interpolation in order to avoid this problem (although it may still show you Euler angles, which are easier for people to understand.) In Blender, bones default to quaternion interpolation, but some reasons objects default to Euler.
Parent the button to an empty with the same transform. Insert the keyframes on the child, and the remove the X and Y rotations from the Dope Sheet.
You need to make sure the knob doesn’t have its rotation applied. Then, you manually enter the rotation value in the axis you need to rotate and set the keyframe.
If you really want to apply the rotation, what you want to do in this case is “apply rotation to deltas”. This feature will allow your object to have a permanent offset in its axes despite the rotation value reading 0, so you can then animate a single axis and have the object spin on its local axis.
Delta transform allows transform values to be reset to 0, but Blender will still store and remember the original value and it will affect the object’s behavior.
Honestly, the first post in this thread is the problem here, it shouldn’t be rocket science to reorientate the axis. I can do this in SolidWorks, Rhino, etc. without difficulty. I have also read when trying to find the solution that it is easy to do in Max and Maya, but I want to use Blender because it is FOSS.
This did not work. Neither the manually entering the rotation or this delta thing.
Once again, parent is set. In the window the knob now follows the parent empty object. When you spin z it shows properly in the window, when you record the animation and play it back it goes completely whacky and spins in a completely wild Z axis.
Note that this is geometry imported from CAD, and not created in Blender. So the Z is never normal to the flat top face of the knob. It is always normal to the World when imported.
Couple of ways to do this but the way I’d go (if I was to lazy to make a simple rig) would be Object>Constraint>Add Constraint (With Targets)>Copy Rotation this will add an empty and constrain the knob to it, then in the constraint options set it to only copy the Z axis and set ‘Target’ to ‘World Space’ and ‘Owner’ to ‘Local Space’… then rotate the empty…
The simplest is to add an empty at the knob origin, clear the rotation of the knob, parent the knob to the empty and then apply your 10deg offset to the empty, knob will now interpolate rotations as expected as it doesn’t have the extra rotation
There’s a bunch of extremely complicated solutions proposed here, but the simplest one has already been said:
Just change your interpolation to quaternion and your rotation will work perfectly
Quaternions always interpolate the shortest route between rotations so not ideal…
clear the rotation of the knob, parent the knob to the empty and then apply your 10deg offset to the empty(parent) … then animate the knob not the parent
Why does the animation not record what is seen happening on the screen? I am truly mindblown how this is not the expected outcome… It shows it rotating in the right axis, but then records the wrong axis. How can this be be acceptable?
confusion comes from changing the transform orientation… this is not how the keyframed transforms work… new easiest solutions is to change your Euler Rotation order to ZYX
I still have no idea what to do, and noone seems to be in any kind of agreement on the solution which confuses things tenfold.
If it shows one animation on the screen and then another when you play it, it is not the fault of the operator to expect it to do what it shows it is doing when the transformation is applied. This is a horrific UX design flaw like I have never experienced in my life.
Trust me… just change your rotation order to ZYX using your original setup… blaming the UX for not being a CAD application isn’t going to help you.
I’m blaming it for showing me one thing, and then doing another when played back. My complaint is not that it is not a CAD program.
If it showed it rotating on the wrong axis, and then was rotating on the wrong axis in the animation then I would not have a problem. It would be clear I need to work out another way. When it shows it doing one thing and records another, that is a UX design flaw.
Blender allows the user to manipulate objects using any orientation they desire, but they’re just “working orientations” -the object has its own proper orientation too, and that’s the only one that’s going to be used for animation. In order to animate objects reliably you first need to make sure they’re oriented with respect to the axes along which they’re going to translate and rotate. Then, always use either local or gimbal orientations to work on your animations.