Warning: enabling auto smooth significantly slows down the viewport when posing a figure

Issue #428 resolved
Xin created an issue

I noticed that the addon enables auto-smooth (in Object Data → Normals → Auto-Smooth) by default, but the problem with this is that when posing the figure (especially one with a lot of vertices), the viewport slows down significantly. I don’t think this is trivial to know and most users won’t know why posing is slow.

Don’t know what’s the best way to solve this. Maybe a global setting? it’s odd that Blender doesn’t give you the option to only enable it for rendering.

Comments (26)

  1. jeroen b

    You can batch switch on/off autosmooth to everything selected, by pressing “alt” while you leftclick the autosmooth button.

  2. Thomas Larsson repo owner

    It was turned on because there is a corresponding option in DS which is turned on. That’s where the angle 89.9 degrees comes from. But I had completely forgotten about this and have suffered myself from poor viewport performance, so it is disabled now. Advanced users who really want auto smooth can turn it on manually.

  3. Xin reporter

    Thanks for the quick change Thomas. Marked as resolved then.

    And that’s useful for people to know too Jeroen.

  4. Alessandro Padovani

    Thomas, autosmooth also affect rendering. So it is needed. Especially when subdivision is not used. We can’t just disable it and it is not an “advanced” option at all.

    Personally I use simplify for viewport performances, and I didn’t notice any sensible gain by disabling autosmooth, but I also don’t do very large scenes so may be this is why. Here the main slowdown for posing seems to be subdivision, not autosmooth.

    To make a simple example, below is how an imported scene looks like without autosmooth, first iray then cycles.

  5. Xin reporter

    If you use complex clothing or HD figures, the performance difference is very noticeable.

    Also, auto-smoothing at 89.9 is not doing much except breaking smoothing at very sharp angles. The actual smoothing is done by the “Shade Smooth” option (which is not being disabled). Organic figures have very few sharp edges (if any), so the option isn’t doing much (but is costly nonetheless because Blender has to calculate the angles).

    If anything, it makes the ear look worse when you are not using subdivision. Just test it and see how little that option is doing.

    Maybe it should be enabled for non-rigged objects (if they use smooth shading at all) and disabled for figures. Any person who uses Blender would know that auto-smooth is off quite quickly, it’s a very basic option. But very few would know that the option slows down the viewport, so I consider the change Thomas made good.

  6. Alessandro Padovani

    Xin, we may disable autosmooth for objects using subdivision, so figures will not be affected. Also please unmark as resolved so Thomas may consider more options before disabling autosmooth.

    Then smoothing at 89.9 is what daz studio does, so we use the same value to get the same rendering as iray.

  7. Xin reporter

    It straight up looks bad for figures without subdivision, so I think it just makes no sense to automatically enable it for characters (and for clothing the user should deiced on a case by case basis, this is a very basic feature of Blender).

    First with auto-smooth on, then with it off.

    It makes little sense to enable it for figures, especially since it’s costly and the user will have a hard time understanding what is slowing down the viewport. For non-rigged meshes, then it could be enabled, but only if the mesh uses smooth shading at all.

  8. Alessandro Padovani

    Yep I agree we could avoid it for figures, since it makes no sense anyway if subdivision is used. But we could have a rigged figure using hard meshes without subdivision, for example a robot. So may be the best choice to turn autosmooth off is to look at subdivision rather than the rig.

  9. Xin reporter

    A robot is a special case for a figure. It’s very likely that you would need more work than just turning on auto-smooth in that case (for example, by using the modifiers that edit normals). That should be the user’s job. Blender is way more powerful than daz, so you can get much better results, That’s the reason why people use Blender to begin with instead of daz. It’s assumed that the user has such minimal knowledge.

    For genesis figures, the main concern of the addon, auto-smooth looks bad without subdivision, and does barely anything/still looks bad when subdivision is on, at the cost of performance (even Blender users will have a hard time tracking where the slow down comes from, since the users weren’t the ones who enabled the auto-smoothing). So it should just be disabled.

    For static assets that are not supposed to be deformed, then it would make sense to enable it to preserve sharp edges, which are common in static assets.

  10. Alessandro Padovani

    As for the robot case I’m not sure I follow. If we use the same 89.9 smoothing angle as daz then we get the same shading. Why should the user go through the hassle of editing normals instead ?

    Unless Thomas can make the plugin create custom normals instead of autosmooth. That would also be more accurate since smoothing in daz studio is a surface property, while in blender it’s a geometry property, thus the same for all materials. But for the common case, if we want to keep it simple, it seems to me that copying the daz default 89.9 is good enough.

  11. Xin reporter

    Because auto-smooth at 89.9 is not good. Blender can do much better, see: https://www.youtube.com/watch?v=S1aJdBGolXA

    This is an issue with many static assets in daz.

    If you just want auto-smooth at 89.9 for a robot, then it’s just a matter of enabling it. Nobody is forcing the user to do the normal edits. Most people only care about organic genesis figures when using daz, so this is a very special case anyway.

  12. Alessandro Padovani

    The purpose of the plugin is not to do what “most people only care about”, but to convert daz assets as they are. Since daz studio is using smooth shading so we need to follow. Why can’t we disable autosmooth just for hard surfaces (that is, without subdivision), and keep it otherwise ? That seems better to me as a compromise.

    edit. On a second thought, a number of outfits come at base resolution, especially G1 G2. So I understand your point to disable autosmooth for all rigged objects. But, we get the same issue with daz studio, since there too we get a smooth shading at 89.9.

    We may have an option to disable autosmooth for all rigged objects, but as a general rule disabling it only for subdivided objects is better to mimic daz studio.

  13. Xin reporter

    Converting daz assets as they are usually results in either poor performance or poor quality. In this case, it’s both. Try interacting with an HD mesh without multires with auto-smooth enabled.

    What happens when the user manually applies subdivision on an auto-smoothed mesh, like clothing? how is the user supposed to know what is slowing down the viewport? the user didn’t set up the auto-smooth, so they have no idea.

    Blender is a much more powerful software with a lot more features, which require processing power. The addon should be smarter and try to adjust to Blender, not to daz, which is hardly a model to follow when it comes to either performance or quality outside genesis figures.

  14. Alessandro Padovani

    I understand your point. May be now Thomas has enough input to find a proper solution. My personal suggestion is to provide options in the global panel, so the user can trade as he wish between performance and accuracy.

    And I agree about the average user probably not being aware of the performance hit. I myself wasn’t.

    • smooth on
    • smooth off
    • smooth off for rigged objects
    • smooth off for subdivided objects

  15. Thomas Larsson repo owner

    Adding an extra option is easy, but I’m not sure how useful it is. Finding the right global setting is not necessarily easier than finding the auto-smooth option in the mesh context.

  16. Alessandro Padovani

    Thomas, as shown in the example above with primitives, autosmooth is needed for hard surfaces, otherwise you get odd artifacts in renderings. So for sure the actual plugin behavior with no autosmooth is wrong, and actually a bug as far as rendering is concerned. Because daz studio does use smooth shading for rendering, so we need it.

    What Xin is reporting is that autosmooth may slow down the viewport, specifically when posing true HD meshes as generated by the Xin addon with the HD mesh option. Because in this case the smooth angle is recomputed when you pose the figure, for the whole HD mesh. That doesn’t apply for multires, since in this case we don’t use a HD mesh to pose the figure.

    So the “right global setting” would be autosmooth on, and this is needed for hard surfaces. But for performance reasons we may turn off autosmooth for HD figures. Or provide options so the user can choose freely.

  17. Xin reporter

    The slow down happens with a lot of figures, including clothing and manually subdivided meshes.

    It makes no sense to enable auto-smooth for assets imported with .dbz. The quality of the auto-smoothing is also bad, as the example above shows. Daz’s problems shouldn’t be imported.

    It only makes sense for static meshes which have no .dbz. For some shoes maybe, but that’s up to the user.

    Maybe include an option in the easy importer, and leave the normal importer without auto-smoothing since any Blender user would rather not have it on by default, it’s too invasive and Blender isn’t supposed to be as sluggish as daz.

    Treating Blender users like daz users is not a good philosophy. You will end up with all the shortcoming of daz inside Blender, with litlte gains as performance takes a nosedive (and even Blender users have no idea what is causing it).

    I agree with Thomas that the option is way too basic and easy to tweak (unlike understanding that the option casues slow downs). It should just be mentioned in the documentation.

  18. Alessandro Padovani

    Again, daz studio does use smooth shading for rendering, if we don’t then we introduce a rendering bug, because without autosmooth cycles will render differently than iray, as shown above with primitives. So do we want to introduce a rendering bug to improve posing performance ?

    Put it another way.

    If we use autosmooth then the rendering is fine, but the user may wonder why posing is slow for some figures. And will have to turn off autosmooth himself with a few clicks as explained by Jeroen.

    If we don’t use autosmooth then posing is fine, but the user may wonder why the rendering is bad for some assets. And will have to turn on autosmooth himself as before, but also to look at daz to check what the correct smooth angle is for the asset, if the plugin doesn’t import it as is the case now.

    I’d rather keep autosmooth on so the rendering is fine, then mention in the docs that you can turn autosmooth off to improve posing performance if needed. Then honestly I myself don’t have a huge pc here, just a ryzen 2200G that’s pretty weak, and didn’t notice any slow posing if I use simplify to turn off subdivision. Below an example with G3F wearing the dark storm armor that’s a mid case and she works fine with autosmooth on.

  19. Alessandro Padovani

    Then another easy option is to use the flat viewport shading for posing that doesn’t compute normals so there’s no slowdown due to smooth shading. May be matcap could also be fast enough.

  20. Alessandro Padovani

    Thomas, for the reasons explained above, please at least consider adding an option for autosmooth on/off in the global panel, eventually with default value off if you don’t like it. So the user interested in posing performance can ignore autosmooth entirely. While the user interested in good rendering can use it.

    Then I see in commit b2b28d2 that it’s easy enough to get autosmooth back by editing a couple lines of code. So as a last resort I’ll do it and advise people in the daz forum who may notice rendering defects to do the same. But honestly this makes little sense.

    Please let us know what you plan to do so Xin can close this one. I’m done here.

  21. Xin reporter

    The thing is, auto-smooth gives worse rendering for figures too, on top of bad performance. It’s just an overall non-sensical option for figures. You won’t see Blender users or animators use that option for characters because it makes no sense (it ruins shading in the ears as the images above show). Copying the bad stuff from daz is not wise. The addon should adapt to Blender first (and try not to be invasive just because daz demands it), which opens a lot of possibilities if done right. If people want a perfect copy of daz, then they should just stick with daz and all its limitations/sluggishness.

  22. Thomas Larsson repo owner

    I added an auto smooth option (default = off), with a description that discourages people from using it.

  23. Alessandro Padovani

    Thomas, commit d02a5f1 works fine for me.

    A more accurate description would be as reported here by Xin, “but leads to poor performance when posing a high density mesh“. There are no artifacts for organic meshes using subdivision that’s what subdivision is for. The ear example by Xin is with subdivision off.

    Xin, I do understand your point of view and I do appreciate that you reported this issue that I wasn’t aware of myself. Thank you for this.

  24. Log in to comment