SubDivision Algorithm

Issue #593 resolved
garden created an issue

Hello.
Is there a way to make the blender work subd according to the catmark algorithm as in daz?

I exported this asset to blender and the windows look wrong (just as if in daz I would choose catmull-clark legacy).
Daz

Blender

The window frame has become round and the glass in the doors is also round.
Is there anything i can do about it?

Comments (24)

  1. Thomas Larsson repo owner

    No, I don’t think so. The subsurface modifier only offers the options Catmull-Clark and Simple. We probably have to wait until the Blender devs implement the Catmark algorithm.

  2. Alessandro Padovani

    The subdivision is the same but I guess we don't import hard edges, that's why the window is rounded.

    Anyway hard edges are a low poly modeling technique. Usually for high poly models the hard edges are replaced by thin loops.

  3. garden reporter

    Alessandro Padovani,
    No, it's the algorithm, as I wrote above, you can check it yourself. Catmull-Clark rounds the edges, but Catmark does not.

  4. Alessandro Padovani

    Well to get catmark in blender you just have to turn off “use limit surface“. But from what I see in your picture I’m quite confident it’s a hard edges issue. Can’t test the specific asset I don’t have it.

  5. garden reporter

    No, I checked it as soon as I noticed the discrepancy. It doesn't work. Slightly changes the geometry (the same rounded edges).

  6. Xin

    As Alessandro says, the subdivision uses the same algorithm. Have you tried using Creases in Blender on those edges to try to achieve a similar effect (in Edit mode, set Mean Crease to 1 on those edges)?

  7. garden reporter

    I think you're wrong.
    In daz, the top is smoothed, and the bottom is sharp.
    In blender, I can make only all the edges sharp or rounded.

  8. garden reporter

    Okay, it works. Thanks.
    But it seems easier to just export the subd from daz to obj than to spend time setting up the faces.

  9. Xin

    But then you are stuck with a high density mesh, Doing any kind of edits on that would be harder.

    I don’t know where daz stores those “sharp” edges, but maybe import_daz can export them and try to recreate them with creases in Blender.

  10. Alessandro Padovani

    Me too don’t know where the sharp edges are in the duf file, or how they are created in daz studio. So can’t help much here.

  11. Thomas Larsson repo owner

    I looked for the sharpness info for the faces, but didn’t find it there. However, I never looked at the edges, will do that tonight.

  12. Thomas Larsson repo owner

    Now I’m home and can check the duf and dsf files, but did find anything about smoothness. No edge info at all, in fact, only vertex and face info.

  13. Alessandro Padovani

    ok I got it

    The subdivision weight is done in the geometry editor where we can define the edge weights the same as blender does. Below an example with a simple cube, scene included sub-cube.duf.

    Then the duf file gets a “edge weights“ table.

  14. Xin

    Thanks for finding that Alessandro.

    I quickly checked it and I saw that the “weight' in daz behaves different than in Blender. In Blender, the crease is just a factor in [0, 1] and affects all subdivision levels, while in daz, it seems that a factor between 0 and 1 only tells it to “crease” the first level of subdivision, 1 and 2 the second, and so on.

    So, if you have, for example a cube with 3 levels of subdivision, a Blender crease of 1 would be translated to a daz weight of at least 3 (to “crease” all subdivision levels).

  15. Thomas Larsson repo owner

    This was trickier than I though. To change the crease value it was necessary to use the bmesh module, which I had never touched before. Anyway, this should work now. The edge crease is set to the fractional part of the edge weight in view of Xin’s comment.

  16. Alessandro Padovani

    Commit a48ed44 doesn't seem to work fine.

    As Xin reports we need to take into account the daz subd level to convert the edge weight to blender. Plus in daz studio the hard edges on the viewport may look different from rendering if the viewport subd level is not the same as the render subd level.

    Below the equation to convert daz hard edges to blender.

    # daz hard edges to blender
    blender crease = daz subdivision weight / daz render subd level
    

  17. Thomas Larsson repo owner

    OK, the equation has been corrected. But I don’t understand why the selected edges has crease = 1.0 in your picture. The daz edge_weight = 0.9 and render subd level = 3, so the blender crease should be 0.3, I think.

  18. Alessandro Padovani

    Commit 90da77b seems good to me. The picture above is just an example to show the crease it doesn’t use the values in the test scene. If Garden and Xin have nothing to add we may mark as resolved.

    It would be nice if Garden can check the rog fantasy home if it works fine. I don’t have the asset so can’t test it myself.

  19. garden reporter

    Yes, it works.
    I just imported it into a blender and the window looks the same as in daz. Thanks!

  20. Log in to comment