Figure scale affects Import Pose with bone translations. Pose is different in DAZ.

Issue #771 resolved
Edwin Cappelle created an issue

Hello,
I found a peculiarity concerning the scale of a figure which has consequences when importing a pose preset that uses bone translations.
Let's say in DAZ you scale the figure down to 90%.
Then you export the figure without its eye lashes (delete the eye lashes before exporting).
When you import this figure in Blender, you will get an armature which is scaled down to 0.9 (as expected).
If you export the same figure with its eye lashes still present, in Blender you will get an armature which is not scaled down (it is 1.0).
I can find no reference in Blender to the 90% scale, but it somehow is still scaled down (figure does have the correct size).
Note that the same applies when instead of the eye lashes, you export with a clothing item (any extra mesh that uses the armature).
So no problem so far, it works (I don't know how, but it works which is what matters).
However I have detected that when the figure was exported with the eyelashes present, there is a flaw when you import a pose for the figure that translates a bone (from a DAZ pose preset).
To test this I do the following:

  • In DAZ I load the default G8F and scale her to 90%. Then export to Blender (with eye lashes).
  • Then in DAZ I change Y Translate of the left pectoral bone to +3 (the maximum to get a clear view of the flaw).
  • Then in DAZ I save this as a pose preset file and also export to Blender (this is how the pectoral bone should be positioned after pose preset).
  • Then in Blender I import the first figure (pectoral bone not translated) and make all bones poseable.
  • Then I import the saved pose preset which moves the left pectoral bone up (and it does).
  • Then I import the second saved figure (what the result should be).
  • Now you can see that the left pectoral bone is not at the same position for both figures, the pose preset moved the bone up too far.

The reason is that in DAZ the translation of the bone was also scaled down to 0.9, while in Blender it is not (multiplying the bone X,Y,Z locations in Blender by 0.9 does give the correct result).
Note that this does not apply to rotations of the bone (scale has no effect on the rotations).

On another note, I have also discovered that Diffeomorphic ignores bone scale changes present in a DAZ pose presets (in DAZ they do apply).
So those don't import in Blender (I use them for pectoral bones only).

Is it possible to fix these issues somehow or will it open a can of worms for other issues?

Comments (16)

  1. Edwin Cappelle reporter

    About the bone scale changes present in a DAZ pose preset that don’t import in Blender, I have discovered the Affect Scale checkbox which was not checked in my case. So this is not an issue. The pose preset with bone scale does import.

    However the bone translation problem remains an issue on a scaled figure.

  2. Edwin Cappelle reporter

    I have found that this issue also affects poses that include facs as they also can contain bone translations.

    Maybe if just before applying the pose in blender, rescale the armature to counteract the figure scale (so you get the figure as it would be at 100% scale in DAZ). Then apply the pose (without affecting the figure scale which you just setup) and then rescale the armature to 1.0 again to get the correctly scaled figure. For this there would have to be some reference to the actual figure scale in Blender to calculate the counteracting scale.

    It is a bit of a hassle. Having an armature that is scaled like in DAZ (instead of 1.0) would be preferable.

  3. Alessandro Padovani

    As for the scale issue, it happens when we merge rigs, because both the geometry and the rigs are normalized. This also makes some sense since dbz is baked from the viewport, but it’s bad for daz animations with scaling because we lose the scale channel this way. If we import without merging rigs then the scale is preserved. One way could be to fix “merge rigs“ so that it preserves the original scale instead of normalizing.

    note. If the rigs to be merged have different scales in daz then I guess it can’t be done to merge them and preserve the scale, but luckily this doesn’t seem to happen.

    note. For a more visible test we can scale G8F to 50% then remove the limits for the pectoral bones and translate to 10. Please note that if G8F is not scaled and we load a scaled pose then everything works fine, that is, the scaled pose is correctly applied. The issue only arises when G8F is scaled in daz.

  4. Thomas Larsson repo owner

    Edit: Forget this. Somehow the object transform is maintained even with dbz fitting.

    The scale issue when merging rigs is arguably a bug, but it is not really the culprit here. Usually you want to import characters with dbz fitting, and then the scale is baked into the mesh anyway. Otherwise you would only get plain G8F in different sizes, which is not very interesting.

    So there are two options when you load the pose, and both are bad.

    1. Affect scale. Then the character is scaled down by a factor 0.81 = 0.9 baked scale * 0.9 from morph.
    2. Don’t affect scale. Then the pect bone is translated 3.0 cm, rather than the desired 2.7 = 0.9 * 3.0 cm

    I don’t have any good idea how to solve this problem, at least not in a general way.

  5. Thomas Larsson repo owner

    Merge Rigs now keeps the object transform, in particular the object scale. Hence the pose is loaded correctly if Affect Scale is enabled.

  6. Edwin Cappelle reporter

    Just tested the latest commit and it works with Affect Scale enabled.

    With Affect Scale disabled, the figure grows to 100% again.

    Maybe the Affect Scale checkbox should be enabled by default because I don’t see any reason why one would want to lose the original scale of the figure after importing a pose.

    Anyway many thanks for fixing this.

  7. Edwin Cappelle reporter

    There is still a minor issue. If in daz you save a pose preset that does not include the figure scale, applying that pose in blender will always re-scale the figure to 100% even though the scale should be left unchanged.

  8. Alessandro Padovani

    I can confirm the bug reported by Edwin, that is, with “affect scale” the scale is forced to 100% if there is no scale in the pose. Other than that commit d7b4513 works fine. I can provide two poses for test, pect-10s50.duf and pect-10.duf are the pectorals translated to 10 cm, with and without the figure scaled at 50%.

    If there is no scale in the pose then the figure scale should not be changed even with the “affect scale“ option.

  9. Thomas Larsson repo owner

    In most cases scale = 1, both for the character and all bones. In that case I prefer not to litter the action with keyframes for the scale channels. But it might be a good idea to nevertheless set the object scale and just skip the bone scales.

  10. Alessandro Padovani

    Thomas, unfortunately that’s not true, though I agree it would be the correct behaviour. That is, a number of PAs use the scale channel to fit the figure to the desired height, instead of using a fbm morph. As a side effect when you zero a pose in daz studio you get the figure back at 100% scale so you lose the original height of the figure, that’s not good. Nevertheless, the figure itself comes with its scale so we should consider it as daz studio does.

  11. Thomas Larsson repo owner

    Now scales are not cleared if Affect Scale is off, neither for the object nor the individual bones. However, the Clear Pose button still clears everything, so it is still easy to lose the object scale. One could add a scale option to that tool too, but it would mean an extra step.

  12. Alessandro Padovani

    Commit 4ca1aab seems to work fine here, if Edwin has nothing to add we may mark as resolved.

    As a side note, if the figure gets the bones translated or scaled in daz then we import the dbz in blender, the armature itself will be correctly scaled, but the bones inside the armature will not get the daz transformations, so I guess this may not work well with animations. But I understand this is how dbz is supposed to work since it bakes from the viewport.

    So, if I understand correctly, in general if we want full compatibility for a “custom“ figure with transformed bones and applied morphs, we have to save the pose then import the figure as “unmorphed“ then import the pose and the morphs. This makes sense and it’s something to be aware of.

  13. Log in to comment