<<Add Hair Rig>> crashes blender

Issue #1430 resolved
Rob Inters created an issue

Hello, Thomas and Alessandro, I tried out the new <<Add Hair Rig>> tool and encountered as it seems a bug.

Steps to reproduce:

Blender 3.2.2

Diffeo 1.7.01450

I used the following hair: https://www.renderosity.com/marketplace/products/152744

1- Load Base GF 8.1 + Hair

2- Separate scalp from Hair Strands

3- Select the hair mesh and run the <<Add Hair Rig>> tool with the default settings.

4- Blender crashes

Comments (15)

  1. Thomas Larsson repo owner

    Add Hair Rig separates the hair mesh into loose parts. Blender has a built-in tool for that, but apparently it has issues with memory allocation that can cause a crash. Therefore the plugin has another way to separate loose parts.

    https://bitbucket.org/Diffeomorphic/import_daz/wiki/Advanced/Meshes/Separate Loose Parts

    The fix consists of using the plugin tool instead. Unfortunately this does not preserve everything that the built-in tool preserves, so there may be other problems down the lane.

    I opened a ticket at Blender’s bug tracker: https://projects.blender.org/blender/blender/issues/105334.

  2. Alessandro Padovani

    I can confirm the issue and added comments at blender.

    bug. separate loose parts. As a minor note the diffeomorphic tool crashes if the mesh has no uv map. That never happens for daz objects anyway.

  3. Alessandro Padovani

    update.

    @Thomas, iss closed the issue commenting there’s 100M data in custom properties that’s duplicated for each part. I can’t see anything in the object nor in the object data. What custom properties iss is referring to ? Where do we see them ?

    p.s. I stripped the test file of all the materials and vertex groups so to leave only the geometry, I also used finalize meshes. But it still takes 50GB then crash. So if there’s custom properties somewhere I can’t find them. Let us know.

  4. Alessandro Padovani

    If it’s the mesh itself he’s referring to then it makes no sense. It would mean that separate by loose parts can only work for small meshes.

    I’ll ask directly to iss then. Assuming by your answer you can’t find any custom property data too. Thank you.

  5. Alessandro Padovani

    update.

    @Thomas The custom properties are visible by enabling the developer extras in the user interface. It’s probably the rigidity groups which take 100M data. Do you think you can go around it ?

    As a side note in my r2 version I removed all vertex groups including rigidity and finalized the mesh, but it didn’t remove the custom properties. Is this a bug in finalize meshes ?

  6. Thomas Larsson repo owner

    Indeed, finalize meshes didn’t always clear custom properties. Now it does and separating loose parts is suddenly fast. This means that the built-in tool can be used by Make Hair and Add Hair Rig, which remove the custom mesh properties before separating. However, Add Hair Rig is still slow, but what takes time is rejoining the loose hairs at the end, so that is a different story.

  7. Alessandro Padovani

    Out of curiosity, why Add Hair Rig needs to separate parts, couldn’t you just keep the hair mesh as it is ? I mean the reason we separated parts in the first place is we noted that it speeded up a lot to convert hair to particles, that is probably not needed for Add Hair Rig.

    Anyway, if there’s nothing to add we may close as resolved I guess. Thank you Thomas for the nice fix.

  8. Alessandro Padovani

    note. As for Add Hair Rig, I don’t know how do you join parts back, but the blender tool is quite fast if you can use it. Just select all the parts then join.

  9. Thomas Larsson repo owner

    To make the hair rig the hair mesh has to be analyzed in much the same way as when we make particle hair, so splitting the mesh give a similar speedup. The plugin already uses the join tool, but it was slow anyway, much slower than joining the separated meshes with Crl-J. Will look into that.

  10. Alessandro Padovani

    May be the code uses the join tool recursively one strand at a time instead of selecting all then join.

  11. Thomas Larsson repo owner

    The tool that separates into loose parts has been removed, since Blender’s native tool works fine.

  12. Log in to comment