General Question about DAZ Bone Rotation/Poses

Issue #957 resolved
Ben ny created an issue

Hello, first of all sorry for hijacking the BugTracker here for a general question.

I’m trying to load Poses (DAZ Pose Presets) directly into Unreal without going through Blender for each Pose, and have a hard time to understand how to correctly apply the bone rotations
Is each Axis Value converted to Quaternion which then get applied in the order which is defined in the Figure file? E.g. YXZ for some bones?! Or is it just a simple additive Euler Rotation?

Attached is a picture of the shoulder bones in Unreal compared to DAZ, the Diffeomorphic rig was exported from blender as FBX with global YXZ bone order, which may have made things a bit worse…

Maybe someone of the gurus around here can give me a bump in the right direction as i’m losing it 😃

Comments (10)

  1. Alessandro Padovani

    I know very little of rigging but I can tell you the daz rig is euler. You can enter the joint editor in daz studio to get the details and figure out how they are translated to blender/fbx.

  2. Jens Hoffmann

    You can’t get the exact same bone axes in UE since the coordinate systems between DAZ and UE differ.

    For exporting a rig to UE, I used “Primary bone axis: X Axis”, “Secondary Bone Axis: -Z Axis”.

    This should give nearly the same bone axis orientation as in DAZ, except that +Z is now -Z.

    (Another hint when exporting rigs to UE: if you want to use the physics asset that gets generated on input you have to take additional steps for importing, as the UE importer uses the raw bone sizes in the fbx for creating the physics asset. Simply put, you need to import the DAZ figure with scale 1 instead of 0.01 to blender. Then after fbx export from blender and importing in UE, set the scale to 0.01 in UE import settings. This will bring the figure back to the right size but still create the PA with correct values.)

  3. Thomas Larsson repo owner

    A pose preset contains local rotations in Euler angles. The bone’s local coordinate system is specified by the bone’s orientation, which is an XYZ Euler. The DAZ Importer makes a set of transformations of the DAZ rotations, because in Blender we want the global Z axis to point up (Y in DS) and the local Y axis to point along the bone. However, you can import a figure with exactly the same orientation as in DS, provided that you change two global settings: uncheck Z Up and check Unflipped Bones, cf. https://diffeomorphic.blogspot.com/p/global-settings-version-16.html. The resulting armature looks funny because these settings are for debugging the code only.

  4. Ben ny reporter

    Thanks both, but i think whatever i pick as primary/secondary axis on export doesn’t really matter for my problem, as the roll can be on different Axis in DAZ (which won’t get transferred through fbx)

    But i’m parsing the Genesis8Figure.dsf anyways, so i’m aware of the DAZ bone roll axis in Unreal

    My main problem is how to convert from DAZ space to Unreals local bone space, that should be just a math problem as all data is available, but i’m not familiar enough with rig’s to just figure it out (hence the bad description of my problem) 😞

    Edit: also thanks Thomas, that looks almost like the Skeleton which i get when doing a FBX export in DAZ and import in Blender. But do i really have to care about the global orientation? As i only want to work in (parent-)bone space

  5. Ben ny reporter

    now looking at this, wouldn’t it be sufficient to calculate the difference as Quaternion between each bone and add it to the desired DAZ Rotation before applying it to my rig? (sticks is DAZ rig, Octahedral is UE)

  6. Jens Hoffmann

    I think it should just be enough to take the rotation and multiply it to the local bone rotation of the rest pose.

    Maybe try with a blueprint to figure it out. I made a simple test pose with lShldrBend and lForearmBend. Transforms applied in bone space:

  7. Ben ny reporter

    yes that works on some bones but not on all, try it on the right arm and you’ll fail to apply the rotation 1:1

    so from my understanding DAZ bones have their axis aligned in global DAZ space, the initial bone rotation (also global space) indicates the initial world space bone rotation.

    i guess i can work with that, and transfer that information to UE Coordinate System, to create an axis mapping for all bones on my skeleton.

  8. Log in to comment