Search Unity

Hair Designer - Dynamic hair & fur tool

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

  1. Nihil688

    Nihil688

    Joined:
    Mar 12, 2013
    Posts:
    503
    Hi! We're using your plugin in Unity 2019.4(LTS) but we're getting this when building:
    Code (CSharp):
    1. Compiled shader 'HairDesigner/AdvancedFur' in 1.25s
    2.     d3d11 (total internal programs: 357, unique: 132)
    3. Shader error in 'HairDesigner/AdvancedFur': undeclared identifier 'input' at xxx/HairDesigner/Shaders/AdvancedFur/AdvancedFur_PBR.cginc(96) (on d3d11)
    4.  
    5. Compiling Vertex program with UNITY_PASS_FORWARDBASE DIRECTIONAL DIRLIGHTMAP_COMBINED DYNAMICLIGHTMAP_ON
    6. Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_HARDWARE_TIER2 UNITY_COLORSPACE_GAMMA UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_FULL_HDR
    7. Shader error in 'HairDesigner/AdvancedFur': undeclared identifier 'v' at xxx/HairDesigner/Shaders/AdvancedFur/AdvancedFur_Strand.cginc(90) (on d3d11)
    8.  
    9. Compiling Vertex program with UNITY_PASS_DEFERRED DIRLIGHTMAP_COMBINED DYNAMICLIGHTMAP_ON
    10. Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF3 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_HARDWARE_TIER1 UNITY_COLORSPACE_GAMMA UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_FULL_HDR
    11. Shader error in 'HairDesigner/AdvancedFur': undeclared identifier 'v' at xxx/HairDesigner/Shaders/AdvancedFur/AdvancedFur_Strand.cginc(95) (on d3d11)
    12.  
    We're using d3d11 in many areas in our game but this is the only one coming back with this, any ideas?
     
  2. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,503
    I've tested to build the demo scene 'FurDemo_DX11' and it works with 2019.4.4f1
    Do you have some specific parameters in the player settings?
    What is your version of HairDesigner?
    Could you try to build the demo scene?

    EDIT : I think that I've found the problem, I'm working on a fix ;)
     
    Last edited: Jul 30, 2020
    Nihil688 likes this.
  3. biscito

    biscito

    Joined:
    Apr 3, 2013
    Posts:
    138
    Hi

    is this in the current version ?
    If yes this is an instant buy !!!
     
  4. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,503
    Yes :p
    This is the URP version of the fur ;)
     
  5. biscito

    biscito

    Joined:
    Apr 3, 2013
    Posts:
    138
    Basic or pro ?
     
  6. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,503
    both ;)
    The Pro version includes the source code, you can upgrade from basic to pro.
     
    biscito likes this.
  7. biscito

    biscito

    Joined:
    Apr 3, 2013
    Posts:
    138
    Hum...
     

    Attached Files:

  8. biscito

    biscito

    Joined:
    Apr 3, 2013
    Posts:
    138
    I don’t see the urp scene
     
  9. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,503
    You have to install the URP Addon ;)"HairDesigner/Addon"
     
  10. biscito

    biscito

    Joined:
    Apr 3, 2013
    Posts:
    138
    great thx !!
     

    Attached Files:

    kalagaan likes this.
  11. MrPhilosophy

    MrPhilosophy

    Joined:
    May 27, 2020
    Posts:
    7
    Is there any way to have soft alphas for softer looking fur edges? the hard clipping of alpha textures is rather unappealing at closer viewing, and when fur is very dense like on an animal. it also makes fuzzy fur look much less fuzzy than it could with softer alphas. Is such a thing possible or difficult to implement?




    Ideally something like the bottom image where different shades of grey control the amount of transparency. Is such a thing possible???
     
  12. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,503
    Maybe I could add a noise on the alpha of the latest shells.
    I'll do some tests ;)
     
  13. MrPhilosophy

    MrPhilosophy

    Joined:
    May 27, 2020
    Posts:
    7
    The example I used was done in blender. the the softer alpha that provides levels of opacity (not just on or off) is called alpha hashed, and the harder alpha was called alpha clip. I am not sure what they mean specifically but maybe you know.

    I found this vid that I suppose explains things better. is it possible to implement such a thing?


    I personally have no idea how you would go about it or what "alpha hashing" means, but it looks to achieve a nice effect.
     
  14. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,503
    Thank you for the reference :)
    I don't think that I could apply this kind of technic, the blending mode is made by the render pipeline.

    Did you tried the fur shader for URP and HDRP?
    The alpha blending is much better.
     
  15. MrPhilosophy

    MrPhilosophy

    Joined:
    May 27, 2020
    Posts:
    7
    That only provides flat geometry and I need something that gives a silhouette that hair designer nicely provides. unless I am mistaken and there is a shell based system already in unity. I come from blender so I mostly know the terms used there. I made these shells in blender by hand using alpha clip and alpha hashed respectively using the top right texture. you can see how soft the bottom version is and imagine how nicely fluffy fur would look using the proper texture. if you can ever find a way to have varied levels of transparency along soft textures like the bottom image that would be amazing. I imagine using grey and white textures you could fake a volumetric effect and such. just a thought!

     
  16. falotfalon

    falotfalon

    Joined:
    Aug 25, 2020
    Posts:
    1
    The selection and design of a hairstyle is difficult, because you have to understand what type of appearance this or that image is suitable for. Not everyone can do this. But if you need it, you can always find help on the Internet. For example, I recently looked at who are suitable mens long hairstyles https://menshaircuts.com/mens-long-hairstyles-guide/. This guide can be really useful for those who deal with haircuts
     
    kalagaan likes this.
  17. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,503
    Nice result, very interesting :)
    It looks like a post process efffect :p
     
  18. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,503
    Thank you for sharing!
     
  19. jitterhorse

    jitterhorse

    Joined:
    Sep 11, 2016
    Posts:
    9
    Hi, can I use the Hair Designer like Blenders particle hair system. Can I make my "fur/hair" a meadow with grass but also little plants with leaves (like foliage) ? if so is there anywhere an example to see? I assume that one charachter with the feathers on his head (poster image of youtube vid) might be already a answer but wanted to be sure before buying. Thanks!
     
  20. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,503
    HairDesigner generates planes with subdivisions and the texture is applied on it.
    It's suitable for feathers, but the plants will be flat, I'll add a way to use custom a mesh for the base shape of the strands.
    So I think that the current version is not yet ready for your needs.
     
  21. jitterhorse

    jitterhorse

    Joined:
    Sep 11, 2016
    Posts:
    9
    Sounds like a bright Future! So Nice. Will this be seen short, mid or long termed?
     
  22. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,503
    I hope that it could be available in a few months, I've a lot of work and I didn't focus on HairDesigner the last month, but I'll have more time in a few weeks ;)
     
    jitterhorse likes this.
  23. MrPhilosophy

    MrPhilosophy

    Joined:
    May 27, 2020
    Posts:
    7
    Again, it uses some sort of thing called alpha hashing. I don't think its a post processes. Not that I know much about the specifics. if I only had just a teeny bit of understanding of how this stuff works, I just know how to use it. I just hope soft edges and soft alpha is a possible feature in the future. at the moment since I am doing still images I have to combine two still images, one with thick fur at low opacity and one with thin fur at full to get a softening effect for the edges otherwise the edge of the fur looks a little to harsh without an extreme use of AA https://i.imgur.com/X8L0bu9.jpg
     
  24. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,503
    Here a first try for alpha hashing ;)

     
    Malbers likes this.
  25. MrPhilosophy

    MrPhilosophy

    Joined:
    May 27, 2020
    Posts:
    7
    :eek: !

    that is already looking interesting! amazing work!
     
  26. Duende

    Duende

    Joined:
    Oct 11, 2014
    Posts:
    200
    Hello, I'm looking for the hair asset that best suits my project. I have some questions:

    1- Is your asset compatible with blendshapes? And with UMA?
    2- I haven't seen long hair in the Asset Store images, is your asset only for short hair and fur?
    3- Can the hair change in runtime? I mean, to become long (grow) and short.

    Thank you, nice asset by the way. :)
     
  27. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,503
    1. Short hair and fur are compatible with blendshapes, long hair are not yet compatible. The package includes a script for the UMA compatibility. Have a look to the documentation.
    2. I won't communicate about long hair until I'll have finished the new animation system and the design tools, but yes, you can already create long hair in the current version. There's some gif and screenshots on this thread. ;)
    3. Yes, there's many parameters that can be modified at runtime : length, colors, thickness, animation settings, wind parameters...
     
    Duende likes this.
  28. Duende

    Duende

    Joined:
    Oct 11, 2014
    Posts:
    200
    Interesting. I've done some research and your asset associates the hair to the original model with the blendshapes, right? But what if after doing several hairs, I decide to add a new blendshape to the model? Is it possible to save the hair and then re-import it when the model changed its blendshapes?

    Is there an approximate date for when will long hair be compatible with blendshapes and/or UMA?

    A few questions out of curiosity or to add suggestions: Is it possible to apply baldness? And wet hair? (Heavier hair, more shine, etc). Both in runtime.
     
  29. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,503
    The strand data are stored into the component, so you can rebuild the final mesh when you need.
    But if you change the original mesh vertices or face order, the haircut will be broken. So adding a blendshape without changing the original mesh will work.

    The long hair compatibility for blendshapes is in the todo list, but I've a lot of other features I want to finish first.
    If I find an easy way to do it, I'll add it earlier ;)

    You can change the animation settings (like the gravity factor) and the shader (add more specular) at runtime, so if you find some settings for different haircut state, you can switch or fade the parameters with the API ;)
     
    Duende likes this.
  30. Duende

    Duende

    Joined:
    Oct 11, 2014
    Posts:
    200
    Well, that's good news. :)
    Oh, that's bad news. :p Hopefully you can find a quick way to add blendshapes to long hair. For now your asset is the best for my project because of the support for UMA and blendshapes, but I would also need long hair. I'll keep an eye on your updates.
    Pretty good. And to add baldness in runtime? In the same way that I can make hair long or short, remove hair in a specific part of the head?
     
  31. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,503
    You can create different layers and enable/disable them at runtime, so for baldness you could create a specific layer.
    You can't edit the mesh at runtime, so you need to create the layers in the editor.
     
    Duende likes this.
  32. Duende

    Duende

    Joined:
    Oct 11, 2014
    Posts:
    200
    Ok, I think I get it. Sounds good. If I can activate 2 layers at the same time (one for the top of the head and one for the rest of the head) a very realistic baldness transition could be made.

    Thank you very much for your attention, I'll be tuned for updates. :)
     
  33. biscito

    biscito

    Joined:
    Apr 3, 2013
    Posts:
    138
    Hey there ,)

    Is there a version that works on unity 2020 ?
    A beta ?
     
  34. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,503
    The current version works with unity 2020, if you have upgraded the project from 2019, you have to download the package again from your project with the package manager, because the DLL must be upgraded.
     
  35. biscito

    biscito

    Joined:
    Apr 3, 2013
    Posts:
    138

    Thx
     
  36. biscito

    biscito

    Joined:
    Apr 3, 2013
    Posts:
    138
    An other question,

    we have been trying to get 60 FPS on Nintendo switch with the fur, do you have a how to use for low profile ?

    because the fur looks fantastic, and we really love to use it in our game !
     
    Last edited: Sep 8, 2020
  37. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,503
    Here some ways to improve performances :
    1- You could use a low poly version of your character for the fur, and set the skinnedMesh Renderer materials list to 0, for hidding the lowpoly mesh.
    2 - Use a MESH_INSTANCING option (better than GPU_INSTANCING) in the design tab.
    3 - Decrease the number of shells at runtime if you need more performances.
    4 - Disable the shadow casting
     
  38. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    6,493
    So back when the wavy hair generator was presented, i was looking for a better way to draw curls for the folding method.

    I found one, I'm ashame it took me so long because it's so simple...

    First generate 2 centered circles with the same center (each pixel check the distance to center) one in the foreground color, the smaller one with the background one. This define the main mask.

    For every pixel compute the 2d normal direction toward the center, then rotate it 90° to get tangent direction (just flip xy of the tangent). Mask it with the background of the previous shape. This define the tangent for hair shading.

    Then shift one half of the uv, along the strand direction, to half it's vertical. That would mean the top and bottom tile would tile, i think the tangent must flip 180° on obe side too. And you would have the main pattern.

    Repeat as needed horizontally to have overlapping strands, potentially use fake shadow by using a falloff computed from the circle generation.

    Wild idea to test, generate truchet tile (the shadertoy extension) style hair with 3d extent across shell? That might help have much more complex strand effect potentially.
     
    Anon32 likes this.
  39. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,503
    Thank you for sharing :)
    I don't know yet when I'll work on this part of the project.
    I'm currently working on the geometry for the strands (node editor and custom mesh) and the animation system.
     
    neoshaman likes this.
  40. DigitalAdam

    DigitalAdam

    Joined:
    Jul 18, 2007
    Posts:
    1,209
    Anyone who's following this thread can you post some examples of your hair styles that you've acheived with this asset please? I'd like to get a better idea of the quality with the latest version. Thanks! (Hope you dont mind Kalagaan).
     
  41. Lewnatic

    Lewnatic

    Joined:
    Sep 29, 2012
    Posts:
    209
    Hello. Are there plans to add LOD systems to the GPU advanced fur? :)
     
  42. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,503
    I'll post some screenshots when the new tool for designing the long hair will be done ;)
     
    DigitalAdam likes this.
  43. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,503
    Yes, I'll do an automatic LOD system for controlling the density, the strand subdivision and shells count, according to the camera distance.

    EDIT : it will be available in the next update (1.10.0) ;)
     
    Last edited: Oct 13, 2020
  44. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,503
    Here a screenshot of the WIP version.
    It's a better version of the curve system, more accurate than the current version.
    There's more options, and a new generator based on custom mesh instead of haircards, I'll post more screenshots soon ;)

     
  45. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,503
    Here a quick test of the motion system.

     
  46. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,503
    It's alive! :p
    When a bug leads to a Gorgon hairstyle :D

     
    Last edited: Oct 20, 2020
  47. r3ndesigner

    r3ndesigner

    Joined:
    Mar 21, 2013
    Posts:
    143
    Hey Kalagaan didnt find a forum from per object fx, so i ll ask here, the asset hava any outline hull option? i am thinking to buy it but just if have it ^^
     
  48. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,503
    Yes, there's an outline FX ;)
    You can use POFX with the built-in render pipeline and URP.
     
  49. JumpingGuy

    JumpingGuy

    Joined:
    Jan 2, 2016
    Posts:
    69
    Hi there,
    Hair Designer is a great product. I'm super impressed by the quality and options for customizing the hair in detail.
    I'm having trouble though with 'Ghosting' in Unity 2019 using HDRP.

    On many of the frames, it's like the Fur from Hair Designer is a frame behind and then it catches. So essentially the character I have the hair attached to loses their hair until it catches us.

    Have you seen this? Can you help? Thanks so much.
     
  50. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,503
    You could try to set the HairDesigner script at the end of the script execution order (Project settings).
    If you're using an IK solver, like Final IK, you have to set the HairDesigner script after it in the list.

    If you have issues, please send me an email (contact@kalagaan.com) with a video or a sample scene.
    I'll help you to fix it ;)