Does Hair Dynamics Work with Mesh Hair?

Issue #978 new
Midnight Arrow created an issue

v1.6.1.0966.

I’ve tested multiple planar mesh hairs with hair dynamics and they don’t work right. Some parts of the hair are simulated but others aren’t. It seems to be a known issue with the Particle Edit mode even though I didn’t (I assume it’s part of the convert process).

https://developer.blender.org/T56818

Using Estal Hair for G2 since it’s so low-poly I don’t need to cull strands.

Steps:

  • Import, merge rigs
  • Separate haircap, use it as basis of particle system
  • Set Resize Hair to 20
  • Once converted trun on “Hair Dynamics”
  • Press play and only pieces of the hair will simulate

Has it worked for anybody ever?

Seems kind of silly to worry about broken particle hair when the whole particle system is going to be dumped in the trash soon but it would be useful for something I’m working on.

Comments (20)

  1. Alessandro Padovani

    Tried with toulouse and I can confirm the issue, both for blender 2.9 and 3.1. I never tried simulating hair before though, so it may very well be something I miss. It also may make little sense to simulate hair without first adding some pinning to retain the hair style.

    If I “delete edit“ then the simulation works fine. So I guess yes it may be something in the editing that blender doesn’t like. Also if I “disconnect hair“ it makes a mess so this may be another clue that something is wrong with the editing.

  2. Maneki

    I’ve another hair conversion addon and I noticed this issue with both. This seems to be not unique to the daz importer. It could be some Blender “bug”

  3. Alessandro Padovani

    Thomas, as a workaround, if we can convert the hair to polylines instead of particles, I’m pretty sure that we can then simulate with cloth. I mean if there’s no way to fix the particles. Also, the “head“ map could be used as a automatic pinning to retain the hair style for simulation, this may work fine enough for most hairs.

    edit. Or we could convert mesh to polylines then polylines to particles, may be this will work fine. Just a wild guess.

  4. Alessandro Padovani

    update. Yes I tried to convert particles to mesh then re-make hair as polylines and works much better. So there’s hope. But still some strands don’t simulate, just a few though. Again if particles can’t be fixed then we may go with polylines and cloth.

  5. Midnight Arrow reporter

    @ Alessando

    I tested the system with hair particles I made myself. The “Pin Guide” slider is all you need to retain the shape with some nice wiggle. But it’ll require some more fiddling to find good values for things like draping on a bed. I also think we could have hair “presets”. Some of the simulation options make it look wavy, for underwater or outer space, or heavy and twisted, for wet hair. Along with a darker shinir material setup it’d bea good way to improve the utility of Daz hairs.

    But since Blender’s particle system is going to be scrapped soon it might be a lot of work for nothing.

    @ Maneki

    In the bug report it’s labelled a known issue. The particle system is so ancient they not bothering to fix it.

  6. Midnight Arrow reporter

    https://www.youtube.com/watch?v=ycsPUOWeOZA

    Here’s a demo of the new hair system in 3.2. It works just like particle edit mode but it’s integrated with sculpting/geonodes now.

    It may be more useful to wait for it to drop than fix the (broken) existing hair particle system. Up to Thomas to decide what he wants to focus on.

  7. Thomas Larsson repo owner

    It shouldn’t be very difficult to switch the output of the Make Hair tool to a mesh rather than particles, but is it useful? A mesh with edges but no faces doesn’t render.

  8. Alessandro Padovani

    Yes, but since simulation for polyline hair seems to work fine we could try to convert mesh to polylines then polylines to particles.

    edit. To explain it better. If we convert “sheet“ hair the simulation doesn’t work. If we convert “line“ hair the simulation works fine. So it is likely that there’s something in the “sheet“ conversion that blender doesn’t like in simulation. And we could try to avoid it by converting “sheet” to “line” then “line” to particles.

  9. Thomas Larsson repo owner

    Still not convinced that it is useful, but it wasn’t hard to implement. Make Hair now has an option to output the result to polylines. Either a single mesh, or separate meshes for different strand lengths just as particles. I could add materials if this turns out to be useful.

  10. Alessandro Padovani

    Nope, seems not useful to fix the issue .. will do some more tests and let you know if I find something.

  11. Alessandro Padovani

    UPDATE. SOLUTION.

    ok I believe I got it.

    The process is a bit odd but produces consistent results and can be automated by the plugin. The simulation will work fine. Basically the trick is to avoid the resize option when we make hair. So we resize then convert to mesh then re-make hair without resize.

    Test scene included toulouse.duf.

    steps:

    1. make hair with resize option
    2. convert to mesh
    3. re-make hair without resize option
    4. turn on dynamics

    Below the toulouse hair with the simulation applied. Please note that I didn’t use collision on the scalp so the hair pass through, also most strands start from the same area of the scalp because the original toulouse mesh is modeled this way. Once you apply a pin map to retain some hair style the simulation will work better.

    edit. DYNAMICS SETTINGS.

    We may also want to add some default dynamics settings for simulation. As Midnight suggests setting a pin goal strength we’ll get a sort of “hair spray“ effect that will tend to retain the hair shape. Also the quality steps and collision distance can be set. Then these values may need modifications depending on the animation and hair style.

    I have no experience at all in hair simulation so these settings are just a start to avoid the “falling hair“ effect. May be @Midnight can suggest better values.

    edit. I fiddled around some more and the following settings is what works fine in my opinion for the toulouse hair. Specifically the pin goal retains the hair style. The thickness outer keeps the hair outside the scalp with a nice offset, otherwise the generated hair is too close to the scalp. Please note that I activated collision for the scalp. The simulation and collision quality seems to be the minimum producing acceptable results, to trade speed with precision.

    edit. note. important. As a side note, mesh hair doesn’t fit well to simulation, since usually the strands are not distributed on the scalp. We can use the pin goal to keep the hair style, but his may not work fine with long hair. So it’s always better to use SBH or dforce hair for simulation.

    The result is quite nice, below it’s a flip back animation where the hair retains the style but it also reacts to gravity.

  12. Maneki

    @Alessandro Padovani I tried your workflow and it doesn’t work for me. There’s still a few strands which don’t move at all.
    Or do I need to download the newest dev version?

  13. Maneki

    Nope, I tested it with the newest version. It looks similar in my Blender scene like on your screenshot so I assume it didn’t really work for you either. There’s some strands which don’t move at all.

  14. Alessandro Padovani

    Yes you’re right there are a few strands that don’t move. But almost all of them work fine. If you try the usual make hair without following the fix above, then no hair will move at all, so this is a big improvement and the best I found.

    Of course please contribute if you find anything better.

  15. Maneki

    The issue doesn’t seem to be something general with mesh hair. I tested it with https://www.daz3d.com/2021-17-hair-for-genesis-8-and-81-females and all strands seem to move. Btw, there seems to be some issue with converting some mesh hair. The convertion with this specific hair for example is really scuffed. Separated parts are not getting removed after convertion with “keep mesh hair” unchecked and resizing activated. I converted it with “daz hair converter” and there it works perfectly.

  16. Maneki

    Here’s a simulation example of the above mentioned hair. As you can see every strand seems to move. It’s not really perfect for overhead poses or motions since mesh hair isn’t connected equally to the skull like dforce hair but yea… it works.

    My guess as of now is that it depends on how the mesh is connected to the haircap.

  17. Alessandro Padovani

    Issue #1580 was marked as a duplicate of this issue.

    A good news in #1580 is that using rekey in particle edit mode may unlock most strands for dynamics. Tip by @KD .

    See #767 for optimizations on the scalp that also affects performances.

  18. Alessandro Padovani

    Marked as task since this is a limitation in the blender particle system, to be aware of, but not a bug in the addon.

  19. Log in to comment