Download

How do I find which two axes to rotate a bone

I am assuming that one axis is to rotate the part of the mesh so that this is the one that I would not be using. I want to plug this to a Transform (Modify) Bone. I have made my character in Blender if that means anything.

Short answer first: If you need some particular “axis” in your animation or rig, create a sub-bone or sub-socket, which determines where that axis goes. Or build a table on the side, where you know that the controller for your elbow always rotates around (for example) local Z, and thus if you want to also change this rotation, you need to use the (local) Z for driving the elbow, essentially duplicating the constraint system you used to create the rig in the first place. Or, maybe easiest, just create an animation that goes from 0 to 90 degrees, name it something easy-to-find, and “drive” this joint simply by overlaying some fraction of this animation.

Long answer, which will require math: There are no specific axes of a “bone” in computer graphics. Any particular axis in space has multiple possible encodings, depending both on your assumed transform space, and on whether you use quaternions, Euler angles, rotator matrices, or something else.

Your animation rigging tool may provide axes for you – you may have a controller that provides a nice “heading/pitch/roll” controller, or an “XYX” Gimbal controller, or allow you to kinematically lock rotation to some particular plane – but those are authoring tool concerns, not animation data concerns. In fact, some authoring tools allow you to lock rotations along a non-planar surface, so there’s not even some particular “axis” or “plane” that would make sense there.

Given that you think you know that there is some “axis” you want to rotate around, you need to figure out what within your source rig actually “makes” that axis, and then use that axis.
For example, you might think that the “X” of a “hand socket” points “out the palm of the characters hand.” This is a convention that you made up, and that the general animation system and computer graphics know nothing about! However, you can count backwards from this convention to figure out what the axis is that you want to rotate around.

There is also the fact that each bone has a “parent.” There’s some “point” around which the “parent” of the bone rotates. For a wrist bone, this would be the elbow bone, for example. If you take the point 0,0,0 in wrist space, and multiply that by the inverse of the elbow transform, you will now have the point of the wrist, in elbow coordinate space. This, in some sense, makes up an “axis” because if you rotate things around this axis, it will indeed be as if the elbow rotated in the axis out to the wrist. (Physically, your elbow can’t directly do this rotation; instead, the bones in the underarm do this, so in good animation rigs, you’ll have one “bend” joint in the elbow, and a separate “twist” joint right below it, and weight your vertices differently between these two joints.)

Excellent explanation but some stuff missed from the asset creation side of the fence.

So world space in general is not an “absolute” as in knowing that things like vectors and rotation is a fixed value from application to application. More or less there is no such thing a Z being considered “absolute” forward as a fixed value needed by the coder or the person coming up with the BP work an does not exist until someone tells the app what direction forward is.

A consideration though is Blender does it’s own thing as far as importing via FBX and the importer has features to deal with the fact that all things imported into UE4 is based on world space.

This adds a monkey wrench to the mix as there are times when you need an “absolute” where in the development pipeline assets needs to be configure to work with preferred applications that makes it difficult or impossible to preload the vectors so to speak.

Epic being smart realized this as an issue so provided some ready made tools to make world orientation of your assets much easier. To pass on a tip in the wonderful world of DCC best practice is to avoid manhandling the asset directly and instead attach the object to a proxy as to know values and parameters to act as the objects own world space so to speak.

Epic supplies this ability by providing ready to use blueprints with a fixed (absolute) proxy ready to use.

The Character BP not only contains a movement component but the movement capsule also defines the forward vector as to the direction the object needs to work with the MC. You import your character you can orientate so it matches the direction expected by the use of the character BP

Paws also adds a world object as well as an actor BP.

As said the short answer is yes but the true answers is it depends :slight_smile: