Search Unity

Hair Designer - Dynamic hair & fur tool

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

  1. SickaGames1

    SickaGames1

    Joined:
    Jan 15, 2018
    Posts:
    1,270
    @UnLogick Will this port over with UMA Power Tools?
     
  2. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    I'm not sure if you're talking about prefab baking which will certainly work or bonebaking which I would assume works. Unfortunately I do not own Hair Designer so I can't tell for sure, but honestly I would be very surprised if it doesn't work.

    @kalagaan Can you think of any potential problems with making this work with my power tools?
     
  3. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,503
    I've never used power tools, so I don't know :p
    The script is really simple to use, it adds the HairDesigner component when the dynamic avatar is generated and it deploys all the haircuts from hairdesigner runtime layers ( prefabs ).
     
    Last edited: Apr 20, 2019
  4. DankP3

    DankP3

    Joined:
    Jul 17, 2017
    Posts:
    93
    @kalagaan, I like to understand if this could be made to work with UMA and head blendshapes (I don't own the product, so please excuse naivety) . Is it possible to export the layers as an fbx that could be modified in blender to include the blendshapes and then use this modified fbx in unity as a base for the UMA hair so that blendshapes could be applied?
     
  5. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,503
    Sorry, I don't know how UMA works with blendshapes...
    If you paint the hair on a character with blendshapes, the mesh generated by HairDesigner will also includes the blendshapes, and the HairDesigner component will synchronise them at runtime.
    So if the character generated by UMA has the same blendshapes, it will work.
     
    DankP3 likes this.
  6. DankP3

    DankP3

    Joined:
    Jul 17, 2017
    Posts:
    93
    If I understand correct, that sounds perfect! Thx
     
    kalagaan likes this.
  7. OfficialHermie

    OfficialHermie

    Joined:
    Oct 12, 2012
    Posts:
    585
    Unity has its own, official HDRP Hair Shader (see this post):
    I've already tested the official Unity HDRP Skin Profile, and it is simply amazing.

    @kalagaan Do you have experience on how to use the official Unity HDRP Hair shader it with your hair?
    I'm asking because I think it's a MUCH wiser solution to use Unity's Hair Shader than relying on anybody else's (happened to me with custom Skin shaders from the Asset Store).
     
  8. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,503
    Yes, I'm working with the Hair Master node for converting the atlas shader to HDRP ;)
    It will be compatible with shadergraph 5.13
    I'll also improve the Texture generator for creating some texture profiles for my shaders, so it will create the specific channels for the Hair master node. :)
    I've already converted Vertexmotion for the new Shader graph (5.13) custom node , so I'll include the wind & motion zone animations to the HDRP shader.
     
    OfficialHermie likes this.
  9. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,503
    Here some screenshots of the WIP HDRP shader





     
    Last edited: Apr 29, 2019
    witson and wetcircuit like this.
  10. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,503
    Here a version with a better control of transparency and shadows :)

     
  11. Lewnatic

    Lewnatic

    Joined:
    Sep 29, 2012
    Posts:
    209
    woah nice. Cannot wait for the HDRP version of the fur shells. :>
     
  12. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,503
    Next step ;)
     
  13. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,503
    Better control of root/tip color & alpha

     
  14. wetcircuit

    wetcircuit

    Joined:
    Jul 17, 2012
    Posts:
    1,409
    Can anyone recommend general tutorials for hair card creation…?

    I seem to hit a wall with Hair Designer. I can build up so much before it's a bird's nest or a lot of identical ribbons. I could use some advice getting to the next level (the atlas, how to blend the edges with scaling or whatever…). I know there's not much tutorial for Hair Designer, but maybe hair cards in general?

    I like the concept of the long hair, but I haven't been able to finish anything… One issue is I somehow accidentally move a hair root to somewhere else on the body, but waaaay off the screen so I don't know how it keeps happening….

    But, meanwhile, thanks for this fantastic asset, I think I need a week doing nothing but hair to get any good at this, lol.
     
  15. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,503
    Thank you for the feedback,
    I'll continue to improve the workflow for each type of layer.
    I know that I have to create more tutorials... :p
    I'm working on a new tool for generating procedural strand meshes, so it will be easier to design with more complex meshes than only hair cards.
    I've started a lot of work at the same time, now I'm trying to finish each feature one by one ;)

    Here some tips :
    - Use a specific scene for creating the haircuts on your character, then export them as RuntimeLayers.
    - Use the design layers to hide/show different parts of the haircut
    - Create many hair cards with a few hair strand on the texture for a more realistic effect.
    - Reduce the spacing factor of the brush when you need more density
    - The long hair curves can be locked to the target surface.
    - Use the mirror tool to create the main design, then add more strands in another layer.
    - Try to use the minimum of subdivisions for better performances.
    - Use the texture generator as soon as possible in the design process, it will improve the overall haircut.
    - Switch between the Design and material tabs to optimize the material settings.
    - Finish the hair cards design when the material and the textures are well configured.
    - Create a copy of the working layer when you need to test some variations.

    I hope that it will help you to be more confortable with the workflow.
     
    wetcircuit likes this.
  16. wetcircuit

    wetcircuit

    Joined:
    Jul 17, 2012
    Posts:
    1,409
    Thanks for the tips, and sorry for the whinging yesterday :p

    I won't be winning hair stylist of the year awards anytime soon, but the texture generator is awesome – now that I understand the workflow better.

    img00016.jpg

     
    petersx, kalagaan and hopeful like this.
  17. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,503
    Nice work :)
    I'm glad hat the tips helped you!
    The texture generator is really important in the process.
    You can also add some color variations for a few cells of the Atlas textures.



    This haircut will be awesome with the HDRP shader :D
     
  18. wetcircuit

    wetcircuit

    Joined:
    Jul 17, 2012
    Posts:
    1,409
    Yeah, SRP makes me sad :( and your hair is rubbing salt in my eyes with all the transparency layers… :cool:

    fwiw, one of my stumbling blocks (something i didn't understand) is how the texture generator makes an atlas to randomize a single layer… I guess I was expecting the atlas to cover the different layers in one texture, so I spent a lot of time trying to figure out how to "assign" part of the atlas to the hairs. :rolleyes: I was over-complicating it.

    Now that I understand a hairstyle is going to have more than one atlas, can I make a suggestion? It would help me to save the Texture Generator settings as presets…. When I need to rescale a layer I could recall its saved preset and edit it.
     
  19. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,503
    A random parameter is stored into the vertex color of each strand, I use it to get a random texture id in the atlas ;)
    When you open the texture generator from the material tab, the settings are stored into the hair layer.
    The textures are automatically updated when you save them in the texture generator.

    I could create a preset file for saving/loading the textures settings.
     
  20. wetcircuit

    wetcircuit

    Joined:
    Jul 17, 2012
    Posts:
    1,409
    Do I need to launch the Texture Gen from this button to get the layers randomizing?
     
  21. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,503
    No the random value is defined when the mesh is generated.
    The random factor in the Material tab -> Hair parameters is an offset for the atlas part selection.
     
  22. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,503
    Better version of the long hair motion (WIP).
    Collisions + gravity + inertia



    and wind

     
    wetcircuit and hopeful like this.
  23. akuei2

    akuei2

    Joined:
    Oct 17, 2018
    Posts:
    69
    OH YES, I been waiting so long ! Show me more, especially the twin tail.
     
    kalagaan likes this.
  24. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,503
  25. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,503
    I'll do some GIF with twin tail tomorrow ;)
     
    akuei2 likes this.
  26. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,503
    Twin tail test ;)

     
    akuei2 likes this.
  27. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,503
    Vertex animation plugged on the HDRP shader :)

     
  28. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,503
    Better control of the centrifugal force :)

     
    hopeful and akuei2 like this.
  29. akuei2

    akuei2

    Joined:
    Oct 17, 2018
    Posts:
    69
    ArHahahaha, So Nice, So Nice ! Damn, you are so Great !
    Update soon please :D
     
  30. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,503
    The centrifugal force was the last feature that I wanted to include ;)
    Now I'm testing on different characters, I'll update the version on the assetstore next week :D
     
    wetcircuit likes this.
  31. kilik128

    kilik128

    Joined:
    Jul 15, 2013
    Posts:
    909
    Hi it's working in 2019 ?
     
  32. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,503
    Yes, it works with unity 2019,
    The HDRP shader will work with shaderGraph 5.13
     
  33. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,503
    Quick test with a mixamo character :D

     
    kpprt, nirvanajie, akuei2 and 3 others like this.
  34. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,503
    akuei2 likes this.
  35. kilik128

    kilik128

    Joined:
    Jul 15, 2013
    Posts:
    909
    pink my shader ^^^ it's pink :)

    ok i'am maybie in shader grah 6.53 with Hdrp 6.53 on unity 2019.2.0a14
     
  36. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,503
    The HDRP version will be available in a few days (HairDesigner v1.7.0) :p
     
    wetcircuit likes this.
  37. Lukisio

    Lukisio

    Joined:
    Jul 7, 2015
    Posts:
    4
    Hi @kalagaan
    I'm just having some problems porting game to Nintendo Switch.
    The error I get:
    A scripted object (probably Kalagaan.HairDesignerExtension.HairDesignerShaderAtlas?) has a different serialization layout when loading. (Read 504 bytes but expected 512 bytes)
    Did you #ifdef UNITY_EDITOR a section of your serialized properties in any of your scripts?


    Could you please inspire me and tell what might cause it?
     
  38. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,503
    Hi,
    I think that this is the problem of DLL serialization with IL2CPP.
    It has been fixed in unity 2018.3.13
     
  39. Lukisio

    Lukisio

    Joined:
    Jul 7, 2015
    Posts:
    4
    Yep! It works. Thank you!
     
    kalagaan likes this.
  40. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,503
    Length control for HDRP :)

     
  41. wetcircuit

    wetcircuit

    Joined:
    Jul 17, 2012
    Posts:
    1,409
    Should I hold off on creating any new long hairs until the new version hits the Asset Store?
    Is it actually a "new" way to build, or just new physics that work on old hairstyles?
     
  42. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,503
    This is a new animation function, it works with older versions ;)
    You'll be able to choose between the new animation method or the old one.
     
    Last edited: May 17, 2019
    wetcircuit likes this.
  43. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,503
    I've pushed a version to the assetstore, it should be available soon :)
    The HDRP version is only compatible with ShaderGraph 5.13

    Unity removed the 'custom function' node from 6.5.3, I hope that it will be back in the new release for the official 2019.2.
    Unity has already change the way to use custom nodes (from a C# API to a HLSL node), I hope that shaderGraph API will be more stable in the future.:confused:
     
    nirvanajie, akuei2 and kilik128 like this.
  44. kilik128

    kilik128

    Joined:
    Jul 15, 2013
    Posts:
    909
  45. trez_mm

    trez_mm

    Joined:
    Jan 17, 2018
    Posts:
    5
    Updated Hair designer, and using HDRP I still get pink materials. What do I need to do to get the hair to display properly?
    Thanks!
     
  46. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,503
    To use the HDRP shader, you have to install the package in the 'HairDesigner/Addon' folder.
    It's compatible with Shader Graph 5.13, so you have to check the version of shader Graph and its dependencies in the package manager. :
    - Core RP Library 5.13.0
    - High Definition RP 5.13.0
    - Shader Graph 5.13.0

    The addon will also install a new demo 'HairDesignerDemo/HDRP/Demo_HDRP'
     
    trez_mm likes this.
  47. Lewnatic

    Lewnatic

    Joined:
    Sep 29, 2012
    Posts:
    209
    Is the new hair HDRP shader also working with fur shells?
     
  48. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,503
    Not yet,
    I'll work on the fur shader for the next update ;)
     
  49. kilik128

    kilik128

    Joined:
    Jul 15, 2013
    Posts:
    909
  50. Lewnatic

    Lewnatic

    Joined:
    Sep 29, 2012
    Posts:
    209
    Thank you. :) Cannot wait for it.
     
    kalagaan likes this.