Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Hair Designer - Dynamic hair & fur tool

Discussion in 'Assets and Asset Store' started by kalagaan, Sep 16, 2016.

  1. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,498
    The version 1.8.3 PRO will be available soon on the assetstore.
    It fixes the Texture generator bug, and improve the installation worflow for HDRP.

    I'll fix the compatibility bug for HairDesigner basic and I'll upload the new version asap.

    EDIT : I've uploaded the version BASIC 1.8.3 to the assetstore too, it should be available soon.
     
    Last edited: Apr 17, 2020
  2. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,498
    HairDesigner Pro is 50% off for the SPRING SALE
    I've also reduce the price of the Upgrade basic -> pro ;)
     
    hopeful likes this.
  3. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,498
    Here my first result of the fur in URP.



    Still need some work, but the conversion from the HDRP version is easier than I thought :p
    And performances are really good!
    The URP support should be available in a week or two.
     
    XthemeCore and hopeful like this.
  4. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,498
    The URP version of shadergraph is really more stable than HDRP. :)
    And I can copy nodes from a HDRP project to my URP project :D

    Here the new URP version :
    Rim / smoothness / AO ...
     
    XthemeCore likes this.
  5. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,498
    Better normals

     
  6. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,498
    Curly version

     
    Malbers likes this.
  7. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,498
  8. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    6,493
    wait what, is the curly version locally change curl? that's the shell method right? What are the curl parameters? That looks almost good, and by that I mean it looks like you are doing a better job that most who can't even approximate your level! The real point where typical render break is on the silhouette, it looks jarring to me, and nobody figure out a way to do it. Also disregard of "baby hair" for clean hair implementation looks artificial.

    BTW I recently just finish a new classification for tight curl hair, there is many parameters:
    - one for diffuseness, ie how much the curl get together, is an afro is diffuse, but "twist" are not.
    - stress, stress has two inputs too, with elongation (along the strand length ie how straight) and side stress (which flatten the curl to a 2d plane)
    - kink, which is the number of spiral perversion events happening (reversing of the curl rotations), kink is also responsible for what black women call "shrinkage", which is the curl going back and forth on itself as it change direction when rotation change and fold onto itself.
    - locking, which is a physical effect that happen between strand due to curl getting stuck physically into each other. This one is kinda hard to emulate, it looks like it need much more than observation into r&d simulation, so not a big deal for now.

    All parameters can vary from root to tips. Most program at best do bad diffuseness and progressive stress, but without side stress and kink they look massively artificial.
     
    Last edited: Apr 19, 2020
  9. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,498
    Yes, this the shell method, I deform the vertices for each shell ;)
    This is a basic way, but it works without losing performances.

    That's an interesting classification that could be usefull for my strand generator, I hope that you'll be able to create any kind of curl hair with this tool. :p
    I'll continue my work on the strand generator as soon as the URP compatibility will be done.
     
    hopeful and neoshaman like this.
  10. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,498
    More URP WIP



     
    Malbers and wetcircuit like this.
  11. Fluffy-Tails

    Fluffy-Tails

    Joined:
    Jun 28, 2009
    Posts:
    120
    I'm glad to see URP support on the way :D
     
    kalagaan likes this.
  12. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,498
    Better version of the gorilla : smooth transition with the main texture.

     
    Malbers and XthemeCore like this.
  13. iconnary

    iconnary

    Joined:
    Feb 9, 2020
    Posts:
    6
    Hi, I'm running Unity 2019.3.5f1, Windows 10, standard render pipeline. I added the Hair Designer Pro component to my SkinnedMeshRenderer object, then added an Advanced Fur layer. The full mesh shows fur correctly. When I try to use the Design tool to paint specific areas on the mesh however, my console fills with these errors and I see nothing drawn on the mesh :

    Code (CSharp):
    1. IndexOutOfRangeException: Index was outside the bounds of the array.
    2. Kalagaan.HairDesignerExtension.HairDesignerGeneratorAdvancedFurBaseEditor.PaintToolAction () (at Assets/HairDesigner/Scripts/Core/Editor/HairDesignerGeneratorAdvancedFurEditor.cs:1396)
    3. Kalagaan.HairDesignerExtension.HairDesignerEditor.OnSceneGUI () (at Assets/HairDesigner/Scripts/Core/Editor/HairDesignerEditor.cs:1136)
    4. System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <437ba245d8404784b9fbab9b439ac908>:0)
    I am able to draw on other standard MeshRenderers in the scene, but not my SkinnedMeshRenderer.

    Thanks for your help.
     
    Last edited: Apr 23, 2020
  14. XthemeCore

    XthemeCore

    Joined:
    Jul 23, 2013
    Posts:
    23
    Very impressive.You made URP support quickly than I thought. :)
     
  15. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,498
    Thank you for the feedback, I'll do some tests with this version asap ;)
     
  16. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,498
    It was easier than I thought for the fur :p
    I've still some work for the atlas shader, the hair lighting is more complicated whith URP.
     
  17. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,498
    The tool doesn't work for models without tangents, you have to enable the tangents in the model importer:
    - Select the model in the project (fbx)
    - Select the 'model' tab in the inspector
    - Choose a 'Calculate' mode for the tangents, instead of 'import'
    - Apply the mofifications

    Let me know if it works for your character.
    I'll add a warning message in the next version ;)
     
  18. wetcircuit

    wetcircuit

    Joined:
    Jul 17, 2012
    Posts:
    1,409
    How is the transparency? is URP any better at alpha layers than built-in?
     
  19. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,498
    I'm impressed, transparency & shadows are much better than the built-in RP, and performances are better too :p
    The transparent shaders cast and receive shadows, there still some sorting order problem, so I have to use both transparent and opaque to fix it, but the final result is nice ;)

    But I can't override the lighting of the PBR master node, so creating the atlas shader lighting is more complicated :(
    Maybe I'll have to generate the shader file and add some functions manually...:confused:
     
    XthemeCore, neoshaman and wetcircuit like this.
  20. GambitMonkey

    GambitMonkey

    Joined:
    Apr 5, 2016
    Posts:
    65
    @kalagaan Thank you for working on this and for providing updates. Looks to becoming along nicely.

    I debated for awhile whether to start new projects with the standard shader for compatibility reasons or URP. After running comparisons using several assets I own, including Nature Manufacture stuff, the performance is just so much better in URP vs Standard that I've had to forgo some of my go to assets with hope they will be updated to the new pipelines eventually.

    Really looking forward to the URP release of your stuff.
     
    kalagaan likes this.
  21. Ruberta

    Ruberta

    Joined:
    Mar 5, 2019
    Posts:
    114
    Does this help?
    https://medium.com/@larsbertram1/lwrp-and-custom-lighting-in-shader-graph-6a7c48008a1d

    https://blogs.unity3d.com/2019/07/31/custom-lighting-in-shader-graph-expanding-your-graphs-in-2019/
     
  22. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,498
    Last edited: Apr 27, 2020
    wetcircuit and Ruberta like this.
  23. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,498
    I've added light transmission :D
    Still need some work, but I'll be able to push a first version of the URP shaders on the assetstore soon.



     
    XthemeCore and wetcircuit like this.
  24. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,498
    Better lighting

     
  25. wetcircuit

    wetcircuit

    Joined:
    Jul 17, 2012
    Posts:
    1,409
    :oops: Ok, time for me to switch to URP. :cool:
     
    kalagaan likes this.
  26. Seankerr

    Seankerr

    Joined:
    Feb 14, 2018
    Posts:
    4
    Hi there. Just brought your asset, the pro version. Looks great. Just wondering if it is possible to copy and paste the Hair designer component values, so I do not need to repeat the process of creating the hair for each character from scratch.
     
  27. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,498
    If all the characters share the same base mesh, you can use runtime layers for sharing the haircut.
    If the characters haven't the same base mesh, there's still no way to share haircuts.

    The final hair mesh is defined by the original mesh skinning and blendshapes.
    I'll work on a retargeting system, but I don't know when it will be available.
     
    Seankerr likes this.
  28. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,498
    I've improved the alpha blending :)

     
    XthemeCore, Ruberta and wetcircuit like this.
  29. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,498
    Better control of thickness :)

     
    hopeful, wetcircuit and XthemeCore like this.
  30. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,498
    Better light transmission for short hair



     
    Ruberta and XthemeCore like this.
  31. OUTERDARKNESS

    OUTERDARKNESS

    Joined:
    Feb 27, 2013
    Posts:
    35
    Hello. I just purchased Hair Designer and am very impressed with the quality and functionality. I am, however, experiencing some strange artifacts when I add any lighting to my scene (other than a single directional light). I get these squares that dance across the screen, like this:



    Image Link:
    https://media.giphy.com/media/ejJ8WRXLlYGaOxoDZb/giphy.gif


    This is in Unity 2019.3.2f1 while running the latest version of HDRP (v7.1.8). I started a new HDRP project and added fur to a mesh within the sample HDRP scene. All SRP setting are default. The fur type I'm using here is a single "shell" layer. This artifact occurs with any light type (point, cone, area), both with our without shadows. If I turn the light off and only have a single directional light, I don't get the artifacts.

    Let me know if you need any more info. Thanks!
     
  32. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,498
    This is a bug of the HairMaster node in shadergraph :confused:
    It looks like these artefacts are done by the points lights on the opaque pass. :(

    I'm working on a new version based on my work with URP, I'll use the Lit Master node instead of the official Hair Master node...
    You can try to disable "shell instancing v2" in design mode and set the 'Transparent threshold' to 0.

    If you want a fix before the official version, please send me an email with your invoice number. ;)
     
    Last edited: May 5, 2020
  33. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,498
    I've fix the HDRP problem!
    For the opaque pass, I used the transparent shader and I've overrided surface type in the material...
    It doesn't work!!!
    Both surface type (shader & material) must be set to opaque :confused:

    I'll post the new version on the assetstore.
     
  34. OUTERDARKNESS

    OUTERDARKNESS

    Joined:
    Feb 27, 2013
    Posts:
    35
    Excellent! Thank you for your quick reply and quick fix! I can wait until the next assetstore update for the fix.
     
    kalagaan likes this.
  35. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,498
    The new version will also include a normal map for the fur and a fix of the demo scenes.



     
  36. Qleenie

    Qleenie

    Joined:
    Jan 27, 2019
    Posts:
    851
    @kalagaan Hey, I have a problem with latest update and HDRP shader: In Scene view, everything looks good, but as soon as I go to play mode, shader turns pink in play view, and pink on left eye in VR (on right eye shader is not seen at all).
    Using Forward only, Single pass Instanced.
     
  37. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,498
    Thank you for the feedback, I'll do some tests in VR.
    What is your version of Unity?
    Do you use the latest version of HairDesigner? (1.8.4 was updated today on the assetstore).
     
  38. Qleenie

    Qleenie

    Joined:
    Jan 27, 2019
    Posts:
    851
    Use latest of both (2019.3.13, 1.8.4)
     
  39. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,498
    Do you use short hair, long hair or Fur ?
     
  40. Qleenie

    Qleenie

    Joined:
    Jan 27, 2019
    Posts:
    851
    Also found another problem: I had an unlocked layer; after updating to 1.8.4, all strands disappear as soon as i go to the design tab, and never come back (until reload of scene).
     
  41. Qleenie

    Qleenie

    Joined:
    Jan 27, 2019
    Posts:
    851
    both short and long hair, both have same behavior
     
  42. Qleenie

    Qleenie

    Joined:
    Jan 27, 2019
    Posts:
    851
    update on this issue: strands are still there, but at different places, somehow "exploded".
     
  43. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,498
    Hum, I've added a way to draw the strands faster, I'll add a way to disable that mode.
    The internal structure of the layer didn't change, this is only the way to draw them, so you won't lose your work.
     
  44. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,498
    Did you apply the HDRP addon from the new version?
     
  45. Qleenie

    Qleenie

    Joined:
    Jan 27, 2019
    Posts:
    851
    yes, I imported the HDRP 2019.3 package. it also shows the shaders correct in scene view.
     
  46. Lewnatic

    Lewnatic

    Joined:
    Sep 29, 2012
    Posts:
    209
    Hello Kalagaan. I updated your furshader to the latest version and got the following error when pressing start in unity.
    Code (CSharp):
    1. ArgumentException: Zero-sized array is not allowed.
    2. UnityEngine.MaterialPropertyBlock.SetFloatArray (System.Int32 name, System.Single[] values, System.Int32 count) (at <58a34b0a618d424bb5fc18bb9bcdac20>:0)
    3. UnityEngine.MaterialPropertyBlock.SetFloatArray (System.Int32 nameID, System.Single[] values) (at <58a34b0a618d424bb5fc18bb9bcdac20>:0)
    4. Kalagaan.HairDesignerExtension.HairDesignerGeneratorFurShellBase.UpdateShells () (at <6deb57166d424f6e8b146a957d7ce4ac>:0)
    5. Kalagaan.HairDesignerExtension.HairDesignerGeneratorFurShellBase.RenderLOD (UnityEngine.Camera cam) (at <6deb57166d424f6e8b146a957d7ce4ac>:0)
    6. Kalagaan.HairDesignerExtension.HairDesignerGeneratorFurShellBase.CameraPreCull (UnityEngine.Camera cam) (at <6deb57166d424f6e8b146a957d7ce4ac>:0)
    7. UnityEngine.Camera.FireOnPreCull (UnityEngine.Camera cam) (at <58a34b0a618d424bb5fc18bb9bcdac20>:0)
    8. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

    I got multiple characters with instantiated from a prefab that has you shader on it.
    I got other scenes with single characters and it works fine. So this seems to be related to spawning multiple characters. Also when not in fullscreen mode and click on the characters in editor. It seems like the fur shell layer has disappeared for some reason.

    Everything worked fine, before the update.
     
    Last edited: May 21, 2020
  47. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,498
    Hum, it looks like something goes wrong with the LOD and the new instancing mode.
    You could try to set the instancing mode to GPU_INSTANCING in the design tab.
    I'll check that asap !

    Edit : you have to disable the LOD for changing the instancing mode (UI bug).
    You could also just disable the LOD, the MESH_INSTANCING mode is faster than GPU_INSTANCING.
    I'll push a fix to the assetstore soon!
     
    Last edited: May 21, 2020
  48. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,498
    I think that I found the bug, one of your characters has a LOD with 0 shell.
    If this LOD is activated the first time (before other LOD on the same character), you get this error.
    You could try to set 1 shell, it should fix the error.
    I'll fix that bug in the next version.
     
    Last edited: May 21, 2020
  49. AquaGhost

    AquaGhost

    Joined:
    Jan 27, 2013
    Posts:
    94
    @kalagaan just purchased the asset and imported into an HDRP project, 2019.3.7. Also imported your HDRP add on. The fur seems impossible to light. Its always black, even in your demos.
     
  50. hhhhhhhhhhhhhhhhhhhhhhhhhh

    hhhhhhhhhhhhhhhhhhhhhhhhhh

    Joined:
    Dec 12, 2015
    Posts:
    1
    I just bought and imported into 2019.3.15 and everything is pink. I tried every demo scene in URP and HDRP. I'm on a new mac. I get these errors.

    Assets/HairDesigner/Addon/UMA/Script/HairDesignerUMALoader.cs(23,25): error CS0246: The type or namespace name 'UMA' could not be found (are you missing a using directive or an assembly reference?)


    Shader properties can't be added to this global property sheet. Trying to add _GrabTexture (type 3 count 1)
    UnityEditor.AssetPreviewUpdater:CreatePreviewForAsset(Object, Object[], String)