Next Enhancement -) Improve lag and slow FPS.

Issue #1477 resolved
Admin X4 created an issue

Hello Thomas!

I just want to propose, that some of the next update for the plugin should focus on improve the viewport really slow FPS and lag with a non low-poly mesh.

I also noticed that when i use MHX the lag and low fps become heavier, at the beginning i though it was a hardware issue.

but i just did upgrade my desktop to a i9-13900k and 64gb DDR5 ram, to notice that the change was minor by upgrading.

Of course i am not new to blender.. and i did all the possible tricks to reduce the lag ( simplify. remove subdivision, solid mode etc..)

for an animation for a V9 HD model with morphs and JCM i am having a 10 fps in solid mode which is ridiculous with my build.

Thank you!

Comments (27)

  1. Maneki

    You should never use HD for animation. You’ll have poor viewport performance in every software with actual HD mesh. Shapekey and mesh performance in viewport is not really something Thomas can improve, you’ll have to wait for Blender to do something about it with for example scaleable multires shapekeys.

  2. Alessandro Padovani

    I get 27 fps for Victoria 9 HD with jcms and facs in MHX, no hair or outfit just the base figure. Viewport in solid mode matcap with no textures. And I run a ryzen 2200G that’s a low level cpu.

    If for HD you mean multires then it shouldn’t affect the viewport performance because we keep the viewport level at zero. Unless you change it by hand.

    The viewport may become slow for a medium scene with some figures because a full featured daz figure uses hundreds of shapekeys and drivers. That’s not common in a native blender figure. You can disable the drivers in the posing panel, but this way you can only pose the body not the face.

    This is one reason why we introduced the brebended workflow, that allows to use prebended figures to approximate the daz figure. The deformations will not be the same as daz but works fine enough and it’s good for animation.

    https://diffeomorphic.blogspot.com/2023/01/

    note. Of course be sure to get the dev version, not the stable that’s quite old now.

  3. Admin X4 reporter

    thank you,

    in the tutorial it says:

    1. In daz studio we prebend the figure as required depending on the figure and the outfit.

    how to prebend on daz a victoria 9 HD ?

    i would love to give it a try to see if it will lower the viewport lag.

  4. Alessandro Padovani

    Just pose the figure so that limbs are prebended then export as HD. The prebending allows both to bake the major daz deformations and to help a stable ik with no flipping. Below it’s a prebended pose in daz studio for Victoria 8 for example. If the figure wears a outfit the prebending may be different to accomodate the outfit features.

  5. Admin X4 reporter

    actually i noticed that the thing that use a lot of ressources are the drivers.

    removing them increased my fps by 100%.

  6. Thomas Larsson repo owner

    Use Disable Drivers at the top of the Morphs panel when you animate. That mutes all existing drivers. Then Enable Drivers when you need to tune morphs and render.

  7. Thomas Larsson repo owner

    Another thing to look out for is the subsurface level. Some assets with SubD Displacement need high subsurf levels in Blender to render properly, but that may slow down rendering terribly. Even if you enable Simplify and limit the number of subsurf levels.

  8. Admin X4 reporter
    • changed status to open

    Sorry for re-opening but thomas i saw that you did the PROTECTED MORPHS which is an excellent idea!! is it possible now to have a function to "disable drivers" only for the unprotected morphs ? and keep the protected morphs driver!

  9. Alessandro Padovani

    I agree that having the option to disable drivers by category would be useful, so for example we could disable all the jcms and keep the face morphs. But when I asked some time ago Thomas replied it is not possible, for the way drivers are coded it is all of them disabled or none. See #1428.

    But we’ll wait for Thomas to confirm.

  10. Thomas Larsson repo owner

    If you look at the drivers in the drivers context you can see that it is an intricate web o f properties that drive shapekeys, bones, and other properties. To disentangle the contribution from a single property is not possible in general. Perhaps it could be done in special cases, e.g. a property that drives a shapekey and nothing else. However, in that case you are better off if you import the morphs with Use Rig Property Drivers = off and Use Mesh Categories = on. Then the shapekeys are imported without any drivers at all (the sliders are not purple), and the shapekey sliders themselves are displayed in the Mesh Shapekeys subpanel.

  11. Thomas Larsson repo owner

    To drive the shapekeys with rig properties was crucial to make them work with file linking in earlier versions of Blender. With the introducion of library overrides you can access the shapekeys themself in the scene file.

    Although I notice now that the pin and clear buttons in the Mesh Shape Keys panel don’t work with linked files. Will check that.

  12. Alessandro Padovani

    @Thomas, I may be wrong but as I see it we don’t need to “disentangle“ anything, if this is the problem. Sure if we disable only some drivers then others may not work properly, but since we do this for preview only to speed up the viewport, not for rendering, then this is acceptable. I mean it will be the user responsibility to disable the drivers.

    Then personally I don’t expect face drivers to be affected if I disable jcms on the figure and outfit. But if they do it will be my fault, I mean as a user.

    So we could let the user disable drivers by category as #1428, with a warning that this may have side effects because drivers affect each other.

    Unless I miss something. Let us know.

  13. Thomas Larsson repo owner

    No, it won’t work. For G3 and G8 characters most morphs are driven face bones. The bone drivers are long sums, with one term for each morph. The time needed to evaluate this sum doesn’t depend on whether the morphs are enabled or not. What does speed things up is to disable the bone drivers, because then this sum doesn’t have to be evaluated. But then the face bones don’t move at all, for any morph.

  14. Alessandro Padovani

    Thank you for the explanation, I understand very little of drivers as I don’t use them in my rigs.

    Ok, then can we disable the drivers only for some bones ? I mean specifically disable them for the body bones and not for the face bones ? Because this would allow us to animate without the body correctives but with facial features.

    Again unless I miss something.

    p.s. For example disabling the drivers for hands and feet would remove a good number of bones from being evaluated without affecting too much the overall animation quality. I mean if it is the number of bones that matters.

    disable/enable drivers:

    • face
    • body
    • hands
    • feet

  15. Thomas Larsson repo owner

    JCMs work the other way around; they are shapekeys driven by bone rotations. Facial expressions are face bone rotations driven by properties, and the body morphs are body bone rotations driven by properties. Since we usually don’t load body morphs in Blender, the whole lag is due to face bone drivers.

    One could eliminate shapekey drivers together with some internal properties. That would turn off JCMs, FACS, and many custom morphs. But it would be messy to analyze exactly which drivers should be muted, and the performance gain is smaller. And as I mentioned above, you can import shapekeys without drivers.

    Another way to increase performance is to use mannequins for blocking animations. It also helps to exclude all collections that you don’t currently work with.

  16. Alessandro Padovani

    Do you mean if we convert face drivers to shapekeys then the viewport will go to full speed ?

    Because if that's the solution then we can do it already.

  17. Admin X4 reporter

    Thomas you sayed it won’t work for G3 and G8, how about G9? better to have something for 1 than to none ;) , and sooner or later people will move to G9.

  18. Alessandro Padovani

    For G9 it’s the same, Thomas was referring to G1 G2 using shapekeys vs G3 G8 G9 using bones + correctives.

  19. Thomas Larsson repo owner

    Actually, G9 and G8.1 use FACS, which primarily consists of shapekeys. You could import the FACS morphs as custom morphs without rig drivers, but if you do that, only the morphs that correspond directly to shapekeys will work. So e.g. Eye blink left and right would work that way, since they are just shapekeys, but the combined Eye blink morph will not work, since it drives the left and right morphs.

  20. Admin X4 reporter

    Also thomas please note when i want remove shapekey drivers for my G9 from the standard morphs, it doesn’t show in the category.

  21. Thomas Larsson repo owner

    Alessandro, there are still drivers to make Blender sliders behave like daz sliders. A slider in DS can both be driven by something else and freely settable. A single Blender property can either but not both, so we need two properties in Blender to emulate the daz behaviour, and drivers that connect them. E.g., the Blink Left shapekey is changed both by the Blink Left property and the Blink Both property., cf https://diffeomorphic.blogspot.com/2021/05/on-raw-and-final-slider-values.html. But if we import the facs morphs as custom morphs and disable rig drivers, we will have the facs shapekeys without drivers. But that is not so convenient, because we only have the basic facs morphs that correspond directly to shapekeys.

  22. Alessandro Padovani

    Thank you Thomas for all the explanations.

    To sum it up, what takes most time as for drivers evaluation is the face rig, and it doesn’t depend on the number of shapekeys but on the number of bones. Thus one way to speedup the viewport is to convert morphs to shapekeys, that we can do with advanced setup > morphs > convert to shapekeys. Is this correct ?

    p.s. This also means that G1 G2 using shapekeys for facial features, are much faster than G3 G8 G9 using bones + correctives or facs.

    p.p.s. If this is correct then a note in the docs would be useful for everyone to be aware.

  23. Thomas Larsson repo owner

    Unfortunately the facs morphs generate lots of drivers too. A daz slider can be both driven by other sliders and independently settable. To mimic that behaviour in blender we need two properties and a driver, as I explained in the blog post above. There are several facs morphs which affect the same facs shapekey, which corresponds to quite a few drivers.

    In some cases the drivers can be optimized, but the price is that you cannot load any new morphs afterwards. I added an option to the Finalize Armature tool to do that. Unfortunately this optimization is most effective when the number of drivers is small and the lag is probably acceptable anyway.

  24. Log in to comment