Questions regarding mesh hairs as well as particle hair physics

Issue #1580 duplicate
AB created an issue

I’ve manged to import a char with mesh hair into blender. I’ve created particle hair from it and deleted the original mesh hair. I’m currently sitting at about 100k hair particles.

I’ve tried running hair dynamics on the hair particles, both at 100k hair particles as well as after culling most of them. The hair doesn’t react to any collision/wind/movement of the character, but will follow the movement of the head. I was wondering if this was an error on my part or is this an issue with the hair in particular?

I’m also trying to reimport the same hair from DAZ to reattach it to the character in blender, but I’m not sure if that’s possible or the possible workflow.

Any help is greatly appreciated

By messing around with particle edit a bit to smooth it and just basically mess around with it, I’ve noticed only part of the hair will react/respond. I’m not too sure what is going on in regards to hair particles generated from diffeo

Comments (25)

  1. Alessandro Padovani

    Yes this is discussed in #978. The culprit is “resize hair”, if you don’t resize then dynamics works fine. As explained in#978, a trick is to first convert to particles with resize then convert to mesh then convert to particles without resize. Or just don’t resize. I’m not sure why Thomas didn’t address the issue yet, there’s no reply.

    @Thomas Larsson If it is not possible to fix #978 then we can add a warning that “resize hair” breaks dynamics.

  2. jeroen b

    Blender's particle hair system is not beeing supported and updated anymore. You may get it to work but you can probably get better and more consistent results if you just keep the mesh hair and simulate that using the cloth modifier.

    As far as I am aware, the new curve based hair system in Blender can not yet be simulated but will likely be in a future Blender update.

  3. Thomas Larsson repo owner

    Also, it is not yet possible to access the new hair curves from python, or at least it wasn’t last time I checked.

    Alessandro, I don’t think I ever looked at #978, since I have almost never use hair dynamics. I will check it out later.

  4. Thomas Larsson repo owner

    I have never really worked with hair dynamics, but I can confirm that it doesn’t work for the hair generated by the plugin. However, since the old particle hair is on its way out, I don’t think it is worth spending a lot of time on it. Better to make dynamics work for hair curves later.

  5. Alessandro Padovani

    Thomas, particle hair works perfect, it is only if we use resize that dynamics doesn’t work. A workaround is explained in #978. Or we can just not use resize so dynamics works fine. Then if the issue with resize can’t be fixed please place a warning in the tooltip that resize doesn’t work with dynamics.

    Or I can add a note in the docs.

    update. combine hairs. Combine Hairs doesn’t work as well, that is, it breaks dynamics same as resize. But it seems to me that resize and combine are the same thing just done before of after.

  6. KD

    The hair particle system behaves oddly but I found it is possible sometimes to make static hairs simulate. You can try selecting the second vertex of an individual hair in particle edit mode. Press G to move the vertex a little bit, then back to object mode and try simulating. If that does not work, select the second vertex of the hair and delete it (press X, delete ‘key’). That sometimes works. If that doesn't work, you can try selecting all the vertices of an individual hair, then right click and choose ‘Rekey.’ These steps are tedious but perhaps they allow troubleshooting for formulating a more robust and automated solution.

    I am not sure whether the static behavior of a hair is due to the vertices being too close together, or having non-sequential numbering in the datablock or something like that. I can only guess; but re-keying an individual hair (either by “rekey” explicitly or by forcing it to “rekey” itself by deleting one of its vertices) seems to enable it to simulate.

    It’s quite sad when people say that the hair particle system is on its way out so there is no point in fixing it. It says this on several forums, but it is an unhelpful comment. It means that for an undefined period of time there will be no simulated hair. My hunch is that it should not be too difficult to solve with the current particle system, enabling some simulated hair until the new system arrives. Ideally a blender dev should do this, because the problem is not just related to Thomas' excellent add-on but also comes up in some particle hair assets on the market which were groomed using the scissors to cut the hair.

    Thomas, perhaps it is not too difficult for you to come up with a re-key tool? Maybe all you need to do is delete one vertex off each hair using the relevant blender ops call? I do not know the api well enough to suggest more precisely.

  7. AB reporter

    @Alessandro Padovani Hmm.. then is there a way for us to “revert” or reimport a new hair to merge to the rig, after i’ve already finalized the mesh and converted it to MHX?

    Tried converting to mesh with deleting the particle hair, ended up with these errors

    Python: Traceback (most recent call last):
    File "C:\Users\..\Roaming\Blender Foundation\Blender\3.3\scripts\addons\Diffeomorphic-import_daz-b7aafc44f666\error.py", line 213, in execute
    self.run(context)
    File "C:\Users\..\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\Diffeomorphic-import_daz-b7aafc44f666\hair.py", line 739, in run
    haircount = self.addStrands(hum, strands, hsystems, -1)
    File "C:\Users\..\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\Diffeomorphic-import_daz-b7aafc44f666\hair.py", line 558, in addStrands
    hsystems[key] = HairSystem(key, n, hum, mnum, self)
    File "C:\Users\..\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\Diffeomorphic-import_daz-b7aafc44f666\hair.py", line 240, in init
    self.material = btn.materials[mnum].name
    IndexError: list index out of range

  8. Thomas Larsson repo owner

    I was able to reproduce the crash; it happened if the hair mesh doesn’t have any materials. Fixed now.

  9. AB reporter

    Hmm… I tried the method mentioned in #978 but yeah, only part of the converted hair particles would work. I’m using the Fiona dforce hair for G8. I’ll keep tweaking/converting-reconverting and see if I get any progress

  10. Alessandro Padovani

    For the workaround in #978 to work fine there must be only one particle system, so no multiple hair colors, and even so some strands will not work but most do. The only safe way is to don’t resize/combine, that means a lot of particle systems to deal with but dynamics will work fine.

  11. AB reporter

    no joy on my side, even with a single particle system. it’s the majority that don’t work for me. I’m quite confused. Could it be because I’m starting out with a polyline hair to begin with?

  12. Alessandro Padovani

    I did some tests with the dforce pixie hair that comes with G9. In general, especially if we want to use dynamics, a direct conversion from daz will not work fine in blender. This is because the blender system is designed on sparse strands with children. So we need to simplify the daz hair then add the children in blender.

    Even so, when we add dynamics some strands will not move, this seems a bug of how strands are generated since everything works fine if we “delete edit”. So it seems some hair editing operations are not compatible with dynamics. May be re-key could help as suggested by KD.

  13. AB reporter

    Deleting the edit just resets everything, tried rekey-ing with no success. So I guess we can wait i suppose. It’s a shame trying to use any polyline hair is quite difficult for blender, even converting to mesh hair doesn’t allow for physics sims.

    Ah well, i suppose this can be considered as Resolved. Thank you

  14. AB reporter

    Similar situation as mentioned in #978 , additionally, perhaps suggest to discourage polyline hair usage if planning for hair dynamics

  15. Alessandro Padovani
    • changed status to open

    This is not resolved. We wait some time for Thomas to see if he wants to try something, otherwise I'll close as duplicate.

  16. KD

    Actually, there might be an easy solution to make the hairs simulate. Go into particle edit mode and de-select all vertices (alt-A). Then right click, and select tips only. Press X to delete the keys for all the tips. Now try simulating. You sacrifice one vertex of length at the tip, but all the hairs hopefully now simulate.

    You will have to re-do the pinning weights but that is not too difficult.

  17. Alessandro Padovani

    Nope, tried with Pixie Hair for G9 and deleting the keys for the tips doesn’t work. That is, it works the same as rekey, almost all the strands simulate but not all of them, there are some that are stuck.

    Anyway rekey improves the situation a lot, and it also speeds up the simulation. It is a good tip thank you KD.

  18. Alessandro Padovani

    Thomas, I get a completely different result with your test scene. None will animate if I resize, but then the blue animates if I rekey.

    steps:

    1. load the test scene
    2. convert red with resize
    3. convert blue with resize
    4. add dynamics and simulate, none will animate
    5. go to particle edit and rekey
    6. simulate, now blue animates, not the red

  19. Thomas Larsson repo owner

    No, here the resized red hair animates at step 4. It doesn’t seem meaningful to make hair sim work, if the behaviour depends on the details of the system setup. I added a warning in the tooltip, but I don’t really want to spend more time on this.

  20. Alessandro Padovani

    Duplicate of #978.

    Ok then, I added these notes in the wiki so hopefully they will be useful to work around the issue in most cases. Of course feel free to modify or delete my notes anytime if you need to.

  21. Log in to comment