auto smooth in blender 4.1

Issue #1992 resolved
Alessandro Padovani created an issue

With 4.1 they removed the autosmooth property for objetcs, so it doesn't work anymore. Now autosmooth is done by edge properties, so every edge can be sharp or not, independently.

What it means to us is that now we could do autosmooth by material, same as daz studio does, by selecting materials in edit mode then assigning the smooth angle with the menu “edge > set sharpness by angle”. But honestly I never saw the daz autosmooth property used in any daz model, usually autosmooth is kept at the default 89.9 and only works on non subdivided models.

So, I'm proposing to just assign the new autosmooth to non subdivided models, per object, as we did before if the global setting for autosmooth is on. To get this done it is enough to use the new menu “object > shade smooth by angle”.

Comments (9)

  1. Thomas Larsson repo owner

    In Blender 4.1 a mesh has two function, shade_smooth() and shade_flat(). In the last commit I use them. If possible I don’t want to use operators like shade smooth by angle.

    I looked into some previous issues about auto smoothing, but they don’t seem contain good test files,, and I don’t know where to find this setting in DS. Perhaps you could upload an example.

  2. Alessandro Padovani reporter

    Reference is #79 #428, where everything is explained about the old way and where to find the daz attributes. As I understand it, the new way in 4.1 avoids the performance issues, because the edges are set as sharp once, when we call the operator, while the old autosmooth was recomputed for every frame for deformed meshes. Of course the new way is not the same thing but it’s good enough for daz assets anyway.

    So there’s no harm to use ops.object.shade_smooth_by_angle(), and it is the minimum we need, on non subdivided meshes, if autosmooth is set in the global settings.

    Anyway, I’m attaching a simple test scene as requested, with a G8 figure where autosmooth should not be used because she’s subdivided, and some primitives where the default autosmooth 89.9 should be used.

  3. Alessandro Padovani reporter

    Commit b7b9cde.

    In the test scene you seem to use smooth_by_angle() even for the G8 figure, that’s subdivided so we don’t have to. This is visible in the object attributes because there’s sharp edges, though probably with zero entries, but with shade_smooth() there shouldn’t be the attribute itself.

    # autosmooth
    if the object is subdivided
      use shade_smooth()
    else
      use smooth_by_angle(89.9)
    

  4. Thomas Larsson repo owner

    Fixed in last commit.

    You write above that the performance issues with auto smoothing have been fixed. Does this mean that we can remove the global Auto Smooth setting, which IIRC was only introduced because it slowed down Blender.

  5. Alessandro Padovani reporter

    Commit 8c24dfc works fine.

    Autosmooth is mainly useful for hard surfaces, thus scenes and props. Personally I always keep it on because without autosmooth edges don’t look right for hard surfaces. But I understand some people prefer to turn it off completely, because for HD objects it is not needed anyway. So I’d keep the option in the global settings.

    Anyway yes, the performance issue is gone.

  6. Log in to comment