Finger incorrect position.

Issue #2172 duplicate
bouich jules created an issue

Hi,

I noticed the finger in this pose are not properly posed.

In DAZ double clicking on the duf give the correct position.

I was thinking it was some limit issue, but turning off or on limit doesnt fix at all.

I am using the last commit version.

Thank you!

Comments (11)

  1. Alessandro Padovani

    4.2.1.2278, blender 4.2.0

    I can confirm the issue. This seems unexpectedly complex. The pose uses a combination of body morphs and bones to pose the hand, which is common in daz studio, and I would expect to work fine in blender since we have posable bones for this purpose. But there’s two main issues.

    1. bug. some body morphs don’t work.

    steps:

    1. import g8 with body morphs
    2. try “left hand fist“, it doesn’t work
    3. try “left fingers fist“, it works fine

    2. bug ? exported pose from daz studio.

    I am surprised here. The daz pose uses a series of fist morphs plus finger bones. Yet it seems when we export the pose not all body morphs are exported by daz studio. For example “left fingers fist” is not exported in the duf file thus not imported by the addon. If in blender we correct the “left fingers fist“ morph by hand then the pose is fine.

    But this can’t be a bug in daz studio as the pose works fine when we load the pose preset.

    update. explanation. In daz studio “finger fist” is driven by “hand fist“, so if there’s no additional offset then “finger fist” is saved as zero. That is, “finger fist“ is always saved as an offset from “hand fist“, because it is driven. Below an example where we use an offset. That explains this at least.

    3. workaround. bake to transforms.

    Of course if we bake body morphs to bones then everything works fine, but this defeats the purpose of importing body morphs so it’s a workaround in this case.

    steps:

    1. in daz studio: edit > figure > bake to transforms
    2. save the pose preset
    3. import in blender, this works fine

  2. Alessandro Padovani

    update.

    Tried 1.7.3 with blender 2.9 and it doesn’t work either, so this seems a long standing issue nobody noticed before.

  3. Thomas Larsson repo owner

    The reason why the finger and thumb fist morphs are not driven by the hand fist is that the plugin doesn’t handle spline_tcb drivers in this case. Spline-tcb drivers are handled correctly when the output is a bone rotation, but not when it is another property. The formulas are in pCTRLHandFist.dsf.

                "formulas" : [
                    {
                        "output" : "Genesis8Female:/data/DAZ%203D/Genesis%208/Female/Morphs/DAZ%203D/Base%20Pose/pCTRLlThumbFist.dsf#CTRLlThumbFist?value",
                        "operations" : [
                            { "op" : "push", "url" : "Genesis8Female:#CTRLlHandFist?value" },
                            { "op" : "push", "val" : [ 0, 0, 0, 0, 0 ] },
                            { "op" : "push", "val" : [ 0.5, 0.3, 0, 0, 0 ] },
                            { "op" : "push", "val" : [ 1, 1, 0, 0, 0 ] },
                            { "op" : "push", "val" : 3 },
                            { "op" : "spline_tcb" }
                        ]
                    },
                    {
                        "output" : "Genesis8Female:/data/DAZ%203D/Genesis%208/Female/Morphs/DAZ%203D/Base%20Pose/pCTRLlFingersFist.dsf#CTRLlFingersFist?value",
                        "operations" : [
                            { "op" : "push", "url" : "Genesis8Female:#CTRLlHandFist?value" },
                            { "op" : "push", "val" : [ 0, 0, 0, 0, 0 ] },
                            { "op" : "push", "val" : [ 0.5, 0.8, 0, 0, 0 ] },
                            { "op" : "push", "val" : [ 1, 1, 0, 0, 0 ] },
                            { "op" : "push", "val" : 3 },
                            { "op" : "spline_tcb" }
                        ]
                    }
                ]
    

  4. Thomas Larsson repo owner

    There is a workaround in the last commit, where TCB splines are approximated with a single line based on the extreme points. So in this case both the finger and thumb drivers is a line with slope = 1, because the extreme points are (0,0) and (1,1). Linear splines are ignored, however, because I recall that approximating a linear spline with a straight line led to problems in some cases.

  5. Alessandro Padovani

    Commit 0161eb2.

    It is better but unfortunately doesn’t work fine, I understand because of the different interpolation. If there’s nothing more that can be done, then in this cases we can use the workaround above and “bake to transforms” in daz studio, which will work fine in blender. That also means in general we can’t trust body morphs or any tcb morph.

    In daz studio, hand fist = 37.5 drives finger fist = 60.5.

    While in blender the value is copied, so hand fist = 0.375 drives finger fist = 0.375, which leads to a different pose.

  6. Alessandro Padovani

    note. tcb warning ?

    If possible, it would be useful to display a warning when a tcb morph is imported, so the user is aware that it may not work the same as daz studio, thus producing different results.

  7. Thomas Larsson repo owner

    I think I got it. Spline drivers now result in smoothstep drivers in Blender. There is a small discrepancy for the finger and thumb fist values, probably because smoothstep does not do exactly the same thing and DS splines. The finger fist spline is given by the points

    [(0, 0), (0.5, 0.8), (1, 1)]

    which the plugin translates into

    0.8*smoothstep(0,0.5,b)+0.2*smoothstep(0.5,1,b)

    Note that you have to enable “Affect Morphs” when importing the pose, and disable limits to get the final pose right.

  8. Alessandro Padovani

    Commit 2a99cb7 is exceptional, thank you for your work on this. There’s a small difference due to tcb vs smoothstep as you noted, but I believe this is the best we can do without making the expressions huge and heavy. In general, some small difference is expected for daz poses using tcb, we may have to fix the pose in blender if the difference is noticeable. Or “bake to transforms“ in daz studio if we want a perfect pose.

    If there’s nothing to add we may close as resolved.

  9. Log in to comment