Rescale UNIT doesn't work properly ( for thomas when return from vacation ;-)

Issue #1496 resolved
bouich jules created an issue

Hello!

Just want to note this problem.

https://streamable.com/2rmwuu ( sorry video quality not clear dont know why HDR is messing up my record lol )

When i animate in 0.010 then convert to 1.0 ( to export to UE)

Animation on the LEGS and HANDS are always deformed ( IK and FK rig of MHX)

Thank you!

Comments (25)

  1. Alessandro Padovani

    https://bitbucket.org/Diffeomorphic/import_daz/wiki/Advanced/Rigging/Change Unit Scale

    I never used it but I’m not sure that “change unit scale“ is supposed to work in animation. Indeed it is under rigging, not under posing. If I’m right that means you first have to change the unit scale then animate and not the opposite. This also makes it unsuitable for animation conversion.

    In your case you may want to rather use the scale parameter available in the exporter/importer. Or just rescale the object at the start of the animation.

  2. bouich jules reporter

    Indeed Alessandro, yes you are absolutely right, if you change unit scale from 0.010 to 1 in my case it will cause no problem ONLY if used before the animation, but if one day you forget to do it ( which is sadly often the case ..) and you already animate then it will cause a problem to change the unit to 1.

    anyway thanks!

  3. bouich jules reporter

    I also would like to add except the RIG there is some shapekey that don’t work properly once you change the unit scale.

  4. Alessandro Padovani

    As for morphs, if you apply the rest pose after changing the scale then there are issues. You have to first apply the rest pose then change the scale. There was a global adjuster for morphs that seems removed, not sure why but I never used it myself and it is not necessary if you pay attention to the rest pose. See #538 there’s a nice explanation by Thomas.

    As I see it, it is enough to keyframe the object scale at the start of the animation. This works both for the rig and morphs and displacement, not sure why Thomas did a separate tool for this. But it is necessary for the bump distance, as also explained in the docs, though this would be better implemented in the material editor imo.

  5. bouich jules reporter

    i know but what is weird is if change manually transform scale and apply object transform my shapekeys stay same.. ( armature is of course deformed like the video) but shapekey stay same.

    however when we use the change unit scale function of the plugin, the armature is deformed ( hands and legs and hips translation movement) but also some shapekeys which i found really weird.

  6. Alessandro Padovani

    That is another thing. If you apply the scale then you set it back to unit so it will not be inherited by translation keyframes. You have to set a scale keyframe for the object. Do not apply.

    p.s. This works because the armature is a child of the object so when you scale the object the transformations of the armature are computed in the object space, thus scaling the object scales the armature translations too.

    p.p.s. As I see it actually there’s no bugs here but just you using the tools not as intended thus expecting different results. Also you have some misunderstanding of how keyframed animation works, this is in blender but it’s the same concepts in other apps.

  7. Alessandro Padovani

    What you’re asking is for “change unit scale“ to work in animation, that’s a feature request not a bug. This also would probably require a different tool in the pose section.

    A possible implementation is for “change unit scale“ to set keyframes for the object scale and for the bump distance at the current frame. This may be useful when we change the object scale in animation since the blender scale doesn’t take into account the bump distance.

    But it also depends how we perceive materials. We may want the object to increase in size but the surface texture to be the same. An example is when we change a figure to reasonable sizes, in this case we want the surfaces as skin and cloth to retain their bump values as they depend on the type of material, not on the figure size.

    note. important. Please note that scale works fine for displacement, so it’s just the bump that’s not affected by the scale. Since the bump is intended as a surface attribute, thus not depending on the object size, this seems reasonable to me. That is, if we want the “bump“ to be affected by the scale then we have to use displacement. In this sense there’s nothing to fix here.

    note for Thomas. Or we may remove the “change unit scale“ tool entirely and rather add a “scale bump“ tool in the material section, eventually working in animation by setting keyframes, that’s probably more reasonable.

  8. Alessandro Padovani

    Again, to rescale a armature with its animation it is enough to set a scale keyframe in the object at the start of the animation. I don’t see any need for a extra addon. Unless I miss something.

    The extra feature for “change unit scale“ is it takes care of the bump distance, that may or may not be desired as explained above.

  9. Xin

    But that’s assuming you aren’t using scale keyframes already, and even then, having to do it manually is cumbersome when dealing with large values or non-uniform scale. Since scale keyframes are defined in a relative manner, they can continue working well if you apply the scale to the armature and adjust all translation keyframes (those are defined in an absolute manner so they need to be changed). Also, in many cases you don’t want scale keyframes at all since they don’t always work well in other programs (for example, game engines).

    I do agree that this is not related to import_daz.

  10. bouich jules reporter

    Hello XIn, how to use your addon? there is no wiki. i want to see if it will not deform my shapekeys.

    EDIT: Found it CTRL+A apply actions scale, however it deform the armature a bit.

    thanks!

  11. Thomas Larsson repo owner

    In my experience, scaling the armature in object mode works fine for everything except for material properties such as bump distance. In the last commit the material part of Change Unit Scale has been made into a separate tool, called Change Material Scale. The original tool will probably be removed in the future, since it doesn’t work properly. The new tool is animated if auto keying is enabled.

    That said, I don’t know anything about game engines, but that is not the task of this plugin.

  12. Alessandro Padovani

    bug. As for scale materials, commit 81e17dc doesn’t work for the principled sss radius.

    note. As a personal note using the object unit as the scale parameter is unintuitive, it would be better to have just a multiplier, eg. 1.5 to scale up to 150%. Also because technically the object unit is a different thing and should not be affected when we scale the object in the scene. I mean even if we scale a figure 5 meters tall her daz unit is still 1 cm.

    note. It would probably be useful to have the “keyframe“ feature as an extra option, so it is clearly exposed in case the user doesn’t want it. Or at least the tooltip should report that the materials will be keyframed if auto key is on.

    tooltip: “Scale material properties with dimension of length (bump distance, sss radius). Will be keyframed if auto keying is on.”

    @Xin I understand what you mean, but it is unlikely that an animation will scale both the armature (pose mode) and the object (object mode), so we can use the object scale for armature animations. In the case where both are used we can simply add a empty as parent and scale that.

  13. bouich jules reporter

    No please thomas don’t delete the change unit scale it’s really super useful, i dont use the blender materials or shaders so i don’t care about that bump thing, i just wanted to know if it’s possible to fix the animation but seems it’s impossible.

    anyway thanks.

  14. Alessandro Padovani

    What do you mean ? You don’t need any tool for the armature it is enough to scale in blender as usual. As for the animation it is possible to scale too as explained above. The only missing tool was for materials now implemented.

  15. Alessandro Padovani
    • changed status to open

    Oops .. forgot there's the bug with principled sss as explained above.

    @Thomas Larsson let me know if something is not clear or if there's any reason not to fix so I'll close as resolved.

  16. bouich jules reporter

    @Alessondro i just asked thomas to keep the unit scale in the advanced setup because it’s a super useful function that a lot of people use daily even though it’s not working properly with materials ( most people who use it doesn’t use blender materials anyways..)

    Regardless, i don’t use material or shader in blender, BUT i decided to give them a try so i discovered a texture bug when i change weightpaint of some part of my body.

    as you notice there is a color change in the middle, i tried the new resize material function but it doesn’t fix.

    This mark ( color change ) appear only when i resize my mesh to 1 There is no problem with the original 0.010.

  17. Thomas Larsson repo owner

    The principled sss bug is fixed, and the auto keying button is displayed in the dialog. The auto keying setting is used in a lot of places in the plugin. I don’t want to show it explicitly for buttons that don’t launch a dialog window, since that would add extra mouse clicks, but for tools like this that already have a dialog it is no extra work.

  18. Alessandro Padovani

    Commit 90bbeb3.

    bug. Nope, the autokey button doesn’t work fine. It seems to take the autokey on/off status when the tool is launched, not as set by the user.

    steps:

    1. launch scale materials
    2. change the autokey status and press ok
    3. check if a keyframe is added, the tool will consider the autokey status at launch, not as set by the user

    @Bouich The “spot“ issue may be due to the increased sss radius in the scaling tool. When you painted the texture you may have used a slightly different color so increasing the sss radius reveals it, also because the figure itself is bigger. I wouldn’t call this a bug though. If you want to scale materials then you have to be precise with colors when painting textures.

  19. Log in to comment