Why is quaternion the default rotation mode for armature bones?
Do gooseberry animators use it by default?
Why is there no way to set a default rotation mode in bender?
Anything Euler is going to be prone to what they call Gimbal Lock in some instances (you generally need some tricks otherwise to avoid it).
That type of situation is already present with the industry standard āturntableā mode that is default for Blender scene viewing (rather difficult to maneuver it past certain orientations).
Its easier to deal with gimbal locks than to animate a character in quaternion. You didnt answer the question about blender foundation project animators using quaternion on their character animation.
So are they using quaternion or euler? Whats most common over there?
I donāt know with Gooseberry, but Nathan Vegdahl, who rigged several of the prior Open Movies, uses a combination of quaternion and euler. Ball joint, such as shoulder = quaternion; hinge joint such as an elbow = euler. I think he has a whole section about it on Humane Rigging, but I havenāt watched it in awhile so might be mistaken.
Ball and socket joint = quaternion
Joint with two axes of freedom = Euler with the two moving axes at each end of the rotation order, e.g. for X and Y rotation use XZY order, and lock the unused (middle) axis
Hinge = Euler with two unused axes locked
Whyās quaternion default tho? Couldnāt say.
there is one magazine talking about all these rotation things for animation / rigging
check it out
but not an easy subject to follow and understand it !
one of the major problem as mentioned before is the gimbal lock
but also the questions of object parent children ectā¦
but even with quaternion rot angle must be less then 360 degrees
you will find this in the magazine description.
happy bl
whatās this magazine called? Iād be interested
but yeah honestly animating with euler rotations is way easier as soon as you want to polish the fcurves.
gimbal lock can actually be easily avoided by setting the correct rotation orders or for example by adding an extra bone that is used to handle orientation.
my personal preference yould be euler as standard because thatās what 90% of my bones tend to be
check mag 31
happy bl
That is very interesting advice. Stored.
I suppose quaternion is default because it has simply been so for so long no one bothered to change it, I think there is a easy enough workaround with the key-map, where one can change the property of the bone to be default=euler, or something like that, Iāll have my computer tomorrow and post a way to do this.
I realize itās been four years since you posted (are you the same user as @proxe ?), but are you aware of a way with the key map to make each new extruded bone in an armature use the XYZ Euler rotation mode by default?
(I know the rationale for quaternions and Iām aware of the potential for gimbal lock with Euler rotations. Despite that, I want Euler XYZ as my default bone rotation when using Blender. I just donāt know how to do it.)
Sorry, I totally forgot to reply to this thread, but there isnāt anything within extrusion keymap that allows the adjustment of the rotation_mode, this property seems to be defaulted to Quaternion, so when the bone is created it would use that default.
A custom extrusion operator wrapper could be made.
Could you point me in the right direction with how to go about doing this? I have no problem coding something myself, but Iām not sure where to start with writing a custom operator wrapper.
Mathematically, quats can be expressed as eulers and vice-versa. The algorithms are easy to find. The trick will be getting the Python code just right that fits it into the user interface. Quite a lot of work ahead of you ā hope that you decide it was really worth doing.
(Clarification: āany position of a quat can be expressed in euler terms and vice-versa.ā The important mathematical differences appear when you begin to combine transformations, as Blender constantly does.)
Mathematically, quats can be expressed as eulers and vice-versa. The algorithms are easy to find. The trick will be getting the Python code just right that fits it into the user interface. Quite a lot of work ahead of you ā hope that you decide it was really worth doing.
@sundialsvc4 ā thanks for the response, but Iām not sure if youāve misunderstood my question or if youāre describing the actual answer and Iām just not grasping it.
Iāve written code to convert quaternions to Euler and vice versa; thatās not a problem. But the issue I have in Blender is, every new bone that I add to an armature has a quaternion rotation mode by default. I have to manually change every new bone to XYZ/XZY/YXZ/etc. Euler, which is annoying.
I would rather have it so that any new bone that gets extruded in an armature is set to XYZ Euler. Later on, as Iām refining the rig, I can decide whether it makes sense to set it to one of the other Euler rotation modes (to prevent potential gimbal lock). So I may not always end up with XYZ Euler as my rotation mode on a bone, but I know for a fact that I absolutely, positively donāt want to use quaternion. (As an animator, itās easier to think in terms of Euler than quaternion, especially when it comes to adjusting curves in the Graph Editor.)
@proxe said this:
A custom extrusion operator wrapper could be made.
I develop software, and I get the concept of a wrapper, but I have no idea where to start with making a custom extrusion operator for an armature. Iām looking for any sort of hint as to what I need to write.
Even if someone can point me in the direction of some other custom operator wrapper and show me how itās done, that would be helpful in giving me an idea on how to do this for extruding bones. Iāve skimmed through (some of) the Python code included with the Blender installation in the hopes of finding out how to do this, but have been unable to figure it out so far.
Use the Info window while doing what you want to do by hand. It will show you most of the Python you need to do. That should get you started.
Use the Info window while doing what you want to do by hand. It will show you most of the Python you need to do. That should get you started.
I already use the Info window when figuring out how to script things with Blender, but how would this help me extrude bones that default to something other than a quaternion rotation mode?
For example, when I extrude a bone, I get this in the Info window:
bpy.ops.armature.extrude_move(ARMATURE_OT_extrude={"forked":False}, TRANSFORM_OT_translate={"value":(-0.127691, 0.17918, -0), "orient_type":'GLOBAL', "orient_matrix":((1, 0, 0), (0, 1, 0), (0, 0, 1)), "orient_matrix_type":'GLOBAL', "constraint_axis":(False, False, False), "mirror":True, "use_proportional_edit":False, "proportional_edit_falloff":'SMOOTH', "proportional_size":1, "use_proportional_connected":False, "use_proportional_projected":False, "snap":False, "snap_target":'CLOSEST', "snap_point":(0, 0, 0), "snap_align":False, "snap_normal":(0, 0, 0), "gpencil_strokes":False, "cursor_transform":False, "texture_space":False, "remove_on_cancel":False, "release_confirm":False, "use_accurate":False})
I donāt see how this helps address the issue. Iām not looking to create bones via script; Iām looking to intercept the way that Blender works so that any new bones that I create through the UI have a default rotation mode of XYZ Euler.
I still donāt have any idea as to how to intercept Blenderās default behavior via Python script. (I know I can fix this issue if I make a personal fork of Blenderās code base ā which Iāve done before ā but Iām trying to avoid that going forward and rely only on the official releases.)
Youāre overthinking it. You wonāt be able to do any kind of āinterceptingā of the behavior, youāll have to make your own tool to do the same thing + the things you want.
Youāre overthinking it. You wonāt be able to do any kind of āinterceptingā of the behavior, youāll have to make your own tool to do the same thing + the things you want.
Is that what was meant by a ācustom extrusion operator wrapperā?
If so, itās probably just easier to fork Blenderās source code again
By āoperator wrapperā, Iām assuming it just means making your own operator which calls bpy.ops.armature.extrude_move('INVOKE_DEFAULT')
within itās execute function.
And then get a reference to that new bone and set it up however you like.
Although getting a reference to the new bone may be challenging, calling extrude_move
will only return whether the operator was successful or not, not the bone itself.