Export Pose to DAZ

Issue #1912 resolved
Star Cle created an issue

Sorry to pollute your forum with this question but I am desperately looking to copy the exact pose of Metahuman for DAZ.
So I wrapped the MH model in Daz and I exported it with another G9 in Blender. With a script I copied the position of the bones on the other G9. But when I export the new pose to DAZ in .duf, fingers are completely deformed. what did I miss?

Comments (11)

  1. Thomas Larsson repo owner

    Your script does essentially the same thing as the Corrections > Copy Pose button. What’s missing in your code is that you should do an update each time you set the posebone matrix, because when Blender calculates the local rotation the parent’s local rotation must be right. And you don’t need to change to pose mode for each bone. So the inner loop could be

    bpy.ops.object.mode_set(mode='POSE')
    for bone in ref_ob.pose.bones:
        if bone.name not in head_bones_to_ignore:
            if bone.name in other_ob.pose.bones:
                other_ob.pose.bones[bone.name].matrix = bone.matrix
                bpy.context.view_layer.update()
    

    However, that is not what causes the ugly deformation of the thumb. I suppose that the MetaHuman rig was changed in edit mode, which doesn’t affect the mesh. The G9 rig is posed in pose mode, and in particular the bones are translated despite the location locks. It looks like the bones in the hand are translated with different amounts, which causes the mesh to deform. Not sure how to avoid that.

  2. Thomas Larsson repo owner

    I though a little more about this. Probably the best way would be to save the character as an FBM file with formulas for the bone heads and tails (center_point and end_point in DS terminology), together with a morph (shapekey) for the mesh. That is typically the content of FBM files, and it could be loaded back into Blender if ERC morphs are enabled. Unfortunately, this plugin doesn’t support export to FBM files. Maybe there is some way of doing it from inside DS. People somehow manage to create FBM files.

  3. Star Cle reporter

    Buddy, i have this error trying to save pose preset: Python: Traceback (most recent call last):
    File "C:\Users\3D Animation\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\import_daz\error.py", line 223, in execute
    self.run(context)
    File "C:\Users\3D Animation\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\Diffeomorphic-export_daz-6c52f392c282\pose_preset.py", line 186, in run
    self.setupBoneFrames(rig)
    File "C:\Users\3D Animation\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\Diffeomorphic-export_daz-6c52f392c282\pose_preset.py", line 349, in setupBoneFrames
    mat = self.getBoneMatrix(pb, bname, smats, rig, frame)
    File "C:\Users\3D Animation\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\Diffeomorphic-export_daz-6c52f392c282\pose_preset.py", line 405, in getBoneMatrix
    inheritsScale(pb)):
    NameError: name 'inheritsScale' is not defined

  4. Log in to comment