axis conversion for G8 hand is wrong

Issue #1687 closed
Alessandro Padovani created an issue

diffeomorphic 1.7.2.1738

I’m not sure how conversion is done. But blender bones should use Y for twist, X for bend, and Z for side-side, so that X is the main movement labeled as “bend” in daz studio. Please note that daz studio can use any axis for twist bend and side-side, we distinguish axes by color where X is red Y is green and Z is blue, luckily blender uses the same colors.

# daz to blender axis conversion
blender Y = daz twist axis
blender X = daz axis labeled as "bend"
blender Z = remaining daz axis

Now this is generally right, that is, when we import a figure we have bend on X. That’s not so for the G8 hand that has bend on Z.

# G8 hand bone conversion
blender Y = daz X
blender X = daz Z (because it's labeled "bend")
blender Z = daz Y
daz rotation order = XYZ
blender rotation order = YZX

note. important. rotation order. Also I see that we correctly import the rotation order from daz studio. This is good because this way we have the same poses and gimbal locks as daz studio when we import FK animation. Please note that in blender we need quaternions for IK to work fine, so we also have to convert from euler to quaternion.

Comments (3)

  1. Alessandro Padovani reporter

    note. I didn’t check all bones in all figures, I see that usually the conversion is good, but not always, so there may be some flaws in the actual conversion code. If we follow the rules above the conversion will always be good.

  2. Thomas Larsson repo owner

    The plugin doesn’t look at the rotation labels, but use the rotation order and the bone orientation to find the map between the daz and blender coordinate systems. The lShldr bone has the same orientation as lHand. Setting up the map was quite complex and I don’t remember exactly why it is done in this way for XYZ rotation order (on line 241 of bone.py). Probably I wanted the arm bones to have the same orientation as in the rigify metarig. Even if would be more correct to change the orientation of the arm bones, I don’t want to do that because I don’t know what the consequences are, and because it would break old animations.

  3. Alessandro Padovani reporter

    Ok, I understand there may be dependencies converting to rigify or mhx and it may be not worth looking at.

    As for the current implementation though, there is no way you can know what bend is without looking at the label, because in daz studio bend can be any axis X Y Z.

  4. Log in to comment