Search Unity

Hair Tool

Discussion in 'Assets and Asset Store' started by andrii-shpak, Dec 15, 2016.

Thread Status:
Not open for further replies.
  1. andrii-shpak

    andrii-shpak

    Joined:
    Nov 27, 2014
    Posts:
    315

    Hair tool is a plugin for creating animated human hair.

    Physics are implemented with a custom engine based on Verlet integration, and executed on GPU (Compute Shader). You can configure elasticy, gravity, drag, and curveness in editor. Sphere Colliders can be added to bones so it interacts with body a realistically. Unity WindZone component is supported.

    Lighting is based on Kajiya-Kay reflection model. You can configure color and specular facor in editor.

    Shadows are implemented as a Unity shadow caster pass.

    Editor is integrated in Unity. Also you can create hair geometry with Blender and 3dmax.

    Asset Store
    Web Page
    Documentation
     
    Last edited: Dec 15, 2016
  2. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,420
    Glad to see this asset got an official forum thread. :)
     
    Malbers likes this.
  3. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,487
    Damm it!!! so goood this asset, I'm having a nerdgasm with the new videos....
     
  4. Knightmore

    Knightmore

    Joined:
    May 11, 2012
    Posts:
    227
    @andrii-shpak
    Hey mate, after our long bugfixing with long hair, I occured some AO problems together with your hair tool.
    I don't know if this is already solved with 1.1.0 and I will try it out the next days.
    Just wanted to give you a heads up. I will try to provide you some screenshots, maybe you can find out if this is a problem on the AO solution side or some bug with the hair shader.
     
  5. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,420
    Manes and tails ... ;)
     
  6. cgarossi

    cgarossi

    Joined:
    Jun 23, 2013
    Posts:
    70
    This looks promising but...

    Getting the error:

    Assertion failed on expression: (!transfer.IsRemapPptrTransfer() && transfer.IsReadingPPtr())

    On the latest version.

    Also, when HairSettings script is applied and the GeometryProvider is not present, the GUI spams NullReferenceExceptions.

    I wish for the love all things holy, developers would CHECK FOR NULLS and deal with them.

    For gods sake, it's not difficult. Page 1 of programming book for newbies.

    This was a relatively expensive asset to purchase and I really wish that appropriate QC is applied before it is submitted to the asset store.
     
  7. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,487
    You know me so wel :p
     
    Knightmore likes this.
  8. Knightmore

    Knightmore

    Joined:
    May 11, 2012
    Posts:
    227
    Now I am really waiting for some showcase of your Horse Animset Pro together with Hair Tools!
    I own both and damn, that would be awesome if you would provide seperate working hair models for those neat horses :eek:
     
    Malbers likes this.
  9. cgarossi

    cgarossi

    Joined:
    Jun 23, 2013
    Posts:
    70
    Can I go back to 1.0? This version is full of bugs and there is ZERO documentation!
     
  10. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,487
    I will make some videos soon I really want to play with this tool :D
     
  11. cgarossi

    cgarossi

    Joined:
    Jun 23, 2013
    Posts:
    70
    When can we expect an update on this?
     
  12. Knightmore

    Knightmore

    Joined:
    May 11, 2012
    Posts:
    227
    There is already LOD. Can't say anything about the rest as I am using the scalp way with 3DS Max
     
  13. incendy

    incendy

    Joined:
    Aug 23, 2013
    Posts:
    5
    Edit: Never mind. I was using my laptop today that apparently still had Unity 5.4 installed. User error.
     
    Last edited: Dec 23, 2016
  14. andrii-shpak

    andrii-shpak

    Joined:
    Nov 27, 2014
    Posts:
    315
    I'll finish documentation tomorrow. Sorry for delay.
    You should use unity 5.5.0
    Previous versions had much more bugs.
     
  15. andrii-shpak

    andrii-shpak

    Joined:
    Nov 27, 2014
    Posts:
    315
    Yes it support skinned mesh renderer
     
  16. andrii-shpak

    andrii-shpak

    Joined:
    Nov 27, 2014
    Posts:
    315
    This assertions is unity but. You cant instantiate compute shader without getting this message.

    Thanks, I missed it. I'll fix it in new update.
     
    hopeful likes this.
  17. RadioactiveXP

    RadioactiveXP

    Joined:
    Nov 6, 2013
    Posts:
    69
    Will this work with the Daz3d Models? What about the Daz3d Hair assets for those models?
     
  18. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,420
    This is completely different hair, so you can use it with any model you have, but you must either use the hair style samples that come with this or make your own.
     
  19. Piahouka

    Piahouka

    Joined:
    Sep 1, 2015
    Posts:
    40
    HI,andrii-shpak.
    I use hair tool v1.1.0 in unity5.5.
    But,when i assign collider to my model, it's hair will be aflo.
    (My model file scale is 0.999)
    Please tell me how to fix it.
     

    Attached Files:

    • hair.PNG
      hair.PNG
      File size:
      218.3 KB
      Views:
      942
  20. andrii-shpak

    andrii-shpak

    Joined:
    Nov 27, 2014
    Posts:
    315
    Try to degrease HairSettings/PhysicsSettings/StandRadius
    Here is tutorials: http://www.shpakivnia.com/hair-tool-documentation
     
    Last edited: Dec 25, 2016
  21. wladm

    wladm

    Joined:
    Oct 4, 2015
    Posts:
    7
    Can't wait for the point-light update. Is it still coming this month?
     
  22. andrii-shpak

    andrii-shpak

    Joined:
    Nov 27, 2014
    Posts:
    315
    It is not ready yet. But I hope to finish it this week
     
    Malbers and hopeful like this.
  23. Piahouka

    Piahouka

    Joined:
    Sep 1, 2015
    Posts:
    40
    Thank you for replying. problem solved!
     
  24. Knightmore

    Knightmore

    Joined:
    May 11, 2012
    Posts:
    227
    Just tried the 1.1.0 inbuild geometry creator and somehow it works really awful for me. The tools sometimes never stop to be activated even after I am not holding the "M" key anymore. It is like a temporary freeze and when I move my mouse over the hair geometry it even gets messed up without holding any key.

    Hadn't those problems with 1.0.6
     
  25. Knightmore

    Knightmore

    Joined:
    May 11, 2012
    Posts:
    227
    Just found another bad problem...

    BackHairless.png

    it doesnt matter if I choose 3DS Max hair geometry or inbuild geometry creator. The back of my scalp doesn't get any hair.
     
  26. andrii-shpak

    andrii-shpak

    Joined:
    Nov 27, 2014
    Posts:
    315
    I'm workingon that. Will be fixed in next build.
     
  27. andrii-shpak

    andrii-shpak

    Joined:
    Nov 27, 2014
    Posts:
    315
    It looks like stand radius is too big
     
  28. Knightmore

    Knightmore

    Joined:
    May 11, 2012
    Posts:
    227
    I raised the stand radius to show, that the back of the head doesn't get any hair while rendering. But it had the hair in debug mesh shown.
     
  29. andrii-shpak

    andrii-shpak

    Joined:
    Nov 27, 2014
    Posts:
    315
    Is it runtime physics debug? Could you show screenshots with physics debug enabled?
     
  30. Knightmore

    Knightmore

    Joined:
    May 11, 2012
    Posts:
    227
    With Physics Debug
    PhysicsDebug.jpg

    Without
    PhysicsNoDebug.jpg

    As you can see, it has the geometry but doesn't render it. I used "Hair Geometry Creator" and the inbuild brush for it.
     
  31. Knightmore

    Knightmore

    Joined:
    May 11, 2012
    Posts:
    227
    Here I tried another approach. Three Geometry Groups created inside of "Hair Geometry Creator". And still no matter what I do, that back of the head doesn't get any hair.

    All hair out of 1 Geometry Group: Failed
    Three geometry groups for each side and the back: Failed

    Physics Debug:
    PhysicsDebug2.png

    Geometry Creator Debug:
    PhysicsDebug2_1.png

    Playmode Render:
    PhysicsNoDebug2.png
     
  32. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,420
    Maybe this is something that could be packaged up and sent to the dev for debugging?

    It seems like it should be something simple that's wrong, but it would be good to get it figured out.
     
  33. Knightmore

    Knightmore

    Joined:
    May 11, 2012
    Posts:
    227
    Yeah just sent it per mail. I wonder why there aren't many more reports about bugs I already found and send to the dev. Is everyone just using short hair?
     
  34. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,420
    Probably not everyone is using it heavily yet, maybe waiting for features like point lights. (Shadows were just added.)
     
  35. Knightmore

    Knightmore

    Joined:
    May 11, 2012
    Posts:
    227
    That is really bad, as if we don't use it and try it out, some stuff would never get the chance to be fixed like the bug I had with long hair.
     
  36. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,420
    I agree, and I'm happy to see that you are testing and finding bugs, as right now I don't have the time. :)
     
    Knightmore likes this.
  37. andrii-shpak

    andrii-shpak

    Joined:
    Nov 27, 2014
    Posts:
    315
    It works good for me http://prntscr.com/dolrvh
    Which unity version do you use?
    Or I've opened wrong scene
     
  38. Knightmore

    Knightmore

    Joined:
    May 11, 2012
    Posts:
    227
    Nope the test scene is the right one. Set the gravity higher so the hair flies then you can see the problems of both scalps (3DS Max and the inbuild creator). You can already see on the right picture that there is hair missing, as the hair end have cut out parts. Those are the missing parts of the back of the head.
     
  39. andrii-shpak

    andrii-shpak

    Joined:
    Nov 27, 2014
    Posts:
    315
    I've found the problem. It because your scalp consist of 2 submeshes. Hair renders only for first sub mesh(
    I can't add multiple submeshes support now. It needs a lot of work. And will be not good for performance. Sorry.
    Just use single mesh.
     
  40. Knightmore

    Knightmore

    Joined:
    May 11, 2012
    Posts:
    227
    Okay this is rather strange as with 1.0.7 the same models used those scalps and they had now problems.
    I reduced them now to one single mesh and it works.

    Maybe you can put this in a F.A.Q. inside the docs?
     
    hopeful likes this.
  41. andrii-shpak

    andrii-shpak

    Joined:
    Nov 27, 2014
    Posts:
    315
    Yes, I plan to make F.A.Q page in documntation. And will add this issue
     
    kurotatsu, hopeful and Knightmore like this.
  42. Knightmore

    Knightmore

    Joined:
    May 11, 2012
    Posts:
    227
    Great!
    Here the result after I reduced the mesh.

    HairResult.png

    I will try out some beards now. Lets see how it works with longer facial hair ;)

    Btw here is a screen about the ambient occlusion see-through I talked about

    Ambient Occlusion.png

    As you can see, the AO of the ear is going through the hair (using the post processing stack)
     
  43. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,420
    IIRC, AO can have problems working with transparencies. This may be something like that.

    (Also, the Unity AO is still under development and is presenting bugs. This could be one of those.)
     
  44. Knightmore

    Knightmore

    Joined:
    May 11, 2012
    Posts:
    227
    Has to be the first, as HBAO does the same. This doesn't happen when you use the HairNoShadow Shader. But I can't figure out why... still have to learn some shader stuff.
     
  45. andrii-shpak

    andrii-shpak

    Joined:
    Nov 27, 2014
    Posts:
    315
    Unfortunately, as I use geometry shader I can't use surface shader. Because of that working with lighting so hard.
    Hair shader (with shadows) uses additional pass to write to depth texture (positions, normals). AO and some other post effects use this texture. Maybe It writing something wrong. I'll check it.
     
    Knightmore likes this.
  46. Knightmore

    Knightmore

    Joined:
    May 11, 2012
    Posts:
    227
    Well AO isn't that bad, as using hair without shadow works good enough. If you can work something out it would still be nice. :D
    But if you could find out how to set up hair with less gloss for beard etc that would be nice. As with 0 specular settings it is still very shiny :)
     
  47. MrG

    MrG

    Joined:
    Oct 6, 2012
    Posts:
    344
    That's going to be an issue for fur as well, as it wouldn't typically be shiny or glossy (with some exceptions).
     
  48. MrG

    MrG

    Joined:
    Oct 6, 2012
    Posts:
    344
    I wonder if that's common (to have sub-meshes)...I'm thinking of animals one might find on the asset store that we'd want to add tufts of hair to various parts (head, tail, backs of legs, mane, etc.). Maybe we need to ask the makers about that before we buy things?
     
  49. MrG

    MrG

    Joined:
    Oct 6, 2012
    Posts:
    344
    Is there any technical reason we couldn't use this for fur or tufts of hair on animals, like manes and tails, for when they're close to the camera? Obviously we'd turn it off when the subject was away.
     
  50. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,420
    Maybe a way to get around this would be to use a texture mask for the hair?

    I don't know ... it's been a few weeks since I last looked at how this plugin works, and I realize I'm already forgetting some of it.
     
Thread Status:
Not open for further replies.
unityunity