Search Unity

  1. Unity 2017.2 beta is now available for download.
    Dismiss Notice
  2. Unity 2017.1 is now released.
    Dismiss Notice
  3. Introducing the Unity Essentials Packs! Find out more.
    Dismiss Notice
  4. Check out all the fixes for 5.6 on the patch releases page.
    Dismiss Notice
  5. Help us improve the editor usability and artist workflows. Join our discussion to provide your feedback.
    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:
    455
    Here my new Extension for Unity 5.4!
    Hair designer is an amazing tool for generating dynamic hair and fur within unity editor.

    [​IMG]

    You can paint and edit hair strands within unity.
    [​IMG]

    The hair shader animate each strand :)
    It's very very fast!
    [​IMG]

    Available on the Asset Store
    Version BASIC & PRO
    ( source code included in Pro version )

    here a timelapse
     
    Last edited: Sep 27, 2016
    twda, Fab4, TeagansDad and 3 others like this.
  2. jaelove

    jaelove

    Joined:
    Jul 5, 2012
    Posts:
    267
    Very cool. looking forward to it.
     
    kalagaan likes this.
  3. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    2,407
    Can this do coarse afro hair?
     
  4. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    3,734
    Looks good, but I wonder about limitations and work arounds. For example, how to handle parted hair, long strands that are combed back, bangs, whorl, braids / pony tail, collisions, hats, etc.
     
  5. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    2,407
    I would also advise to have:
    - a parent hair with interpolated children system, where the few parent hair are use to comb, it allow for better control
    - a layer system so you can group hair by zone or texture, it allow to better control hairstyle, where each zone can overlap and where you only affect hair within that group
    - a way to bake data onto a texture and regenerate from that texture (potentially opening to procedural hair generation through generated map or blending).
     
    twda, theANMATOR2b and hopeful like this.
  6. punk

    punk

    Joined:
    Jun 28, 2013
    Posts:
    316
    Totally rad ;)
     
  7. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    455
    [​IMG]
     
    Ragoo likes this.
  8. christoph_r

    christoph_r

    Joined:
    May 20, 2013
    Posts:
    249
    What are the tri counts of those hair meshes?
     
  9. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    455
    You can create semi-long hair, I'll add pony tail and long hair later.
    The system is designed with layers, so you can create different hair (ex : with or without hat) and switch between them.
    I will add different kind of layers : paint mesh, ponytails, procedural generator...
    I'll also add a collision system ;)
    The shaders are compatible with shader model 2, so it should work on all platforms :)
    This is the first release, the system is ready for next steps.
     
    hopeful likes this.
  10. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    455
    I didn't try to optimize :p
    3672 tri
     
  11. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    455
    Yes I could do a system to generate procedural hair strand, I'll think about it.
    There's a layer system, so you can work on different parts independently.
    I can't bake data into textures, there's a lot of parameters for each strand, but I think I'll do some procedural generators.
     
  12. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    455
    Hair mesh is deformed by bones in the same way than the original mesh :)
    You can easily paint dynamic fur!
    [​IMG]
     
  13. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    3,582
    Does the hair inherit the bone-weight averages of the triangles they are attached to? For systems that morph using bones (like UMA)?
     
  14. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    455
    It's attached to the nearest vertex, maybe I could add different mode for getting bone weights :)
     
    hopeful likes this.
  15. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    455
    thank you for the inspiration ;)
    [​IMG]
     
    punk likes this.
  16. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    455
    The package include a compatible version of the standard shader, so you can use PBR materials.
    Here some feathers :D

    [​IMG]
     
  17. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    2,407
    Can make it so normal of the mesh are automatically aligned with the scalp? For example let's assume you have a hair straight up on the sclap, normally being a plane the normal would be tangential to the sclap, instead the normal should be in the same direction of the plane, which would simulate the effect of the volume of hair, this is used to get tree have nice shading with their leafy planes.
     
    kalagaan likes this.
  18. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    455
    Each hair strand is designed with a curve, I could set the vertices' normals to the tangent of the curve.
    Thank you for this feedback, I'll try to add a lerp factor for switching the normal. ;)

    Edit : I've added a 'Normal Switch' parameter, the result is really great, a better control of the reflections on the hair cut :D

    [​IMG]
     
    Last edited: Sep 18, 2016
    neoshaman, christoph_r and punk like this.
  19. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    455
    Playing with the tool for generating grass
    I can change the density in real time :D
    [​IMG]
     
    Last edited: Sep 19, 2016
  20. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    455
    hair Designer is available ! :D
    Version BASIC & PRO

    ( source code included in Pro version )
     
  21. eldarune

    eldarune

    Joined:
    Nov 14, 2013
    Posts:
    8
    Hello Kal i have your vertex motion and happy with it. I am quite interested with this one, i don't have any idea how this thing works but is there any possibility to take the creation out of the unity, as alpha cards (fbx,obj,dae) and edit it?
     
  22. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    455
    Hi,
    all the meshes can be saved as objects in the project folder.
    So it could be possible to write an exporter, but the skinning would be broken...
    And the shaders (hair&fur, fire...) won't work with another software. :confused:
    The main interest is to keep the model in unity, and edit it with the tool.
    I'll update the brushes and I'll add more features. ;)
     
  23. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    455
    Better hair root :D

    [​IMG]
     
  24. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    2,407
  25. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    455
    Here a sample with large plates ;)
    [​IMG]
     
  26. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    3,582
    Can the hair be saved out as a separate mesh?
     
  27. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    455
    Layer's strands are merged into a single mesh, which can be saved to the project folder.
    So it's fast to load and you can use it on a skinmeshRenderer or a MeshRenderer.
    The hair designer component contains all the data for generating the final mesh, so you can do changes whenever you want. The motion system is computed by the HairDesigner component and it also provide the data to the shader, so I recommand to use the HairDesigner component.
    If you don't care about motion, you can use the mesh with other shaders :)
     
    Last edited: Sep 29, 2016
    neoshaman likes this.
  28. eldarune

    eldarune

    Joined:
    Nov 14, 2013
    Posts:
    8
    Thank you for your prompt answer. I don't want to use the shader/ unity/code capabilites out of the box. I just want to use the cards as a mesh , when you improve your product like ( cutting hair etc. ) it could be an amazing hair tool for 3d artists. Actually one of the most time consuming pipeline is making the hair :) . It can seriously help me
     
  29. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    455
    I've started working on this tool because I tried to create hair in blender, and it was so long!!!
    Now I can do a hair cut in 10 min :D
    I'll probably create a system for baking hair strands into an atlas. It would be faster for mobile devices, and the export should be usable in other softwares. But now I'm focusing on the tool features for designing hair cut.
     
    eldarune likes this.
  30. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    2,407
    If you can take inspiration from blender's hair rendering (actual hair not polygon hair) the better :D Notably using a few control strand before generating clones between them (makes styling easier, as you don't have to micromanage all of them like in your video) And of course "bend height" basically, combing hair don't flatten them until a certain height.

    Also now I have resolve my banking problem I'm going to buy it very soon anyway :D Also you should find the ripped model of sazh from ff13 to see how they did the hair, having base coarse afro hair texture might help a lot having a complete hair solution :cool:
     
  31. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    455
    I'll add different kinds of layer, maybe a DX11 layer with generated hair instead of polygons.
    I want to create a system with different kind of hair rendering with specific tools, so you'll be able to mix them.
    I have tons of ideas :)
    Final fantasy is a great inspiration
    http://kotaku.com/why-final-fantasy-xv-has-fantastic-hair-1686719974
     
    neoshaman and hopeful like this.
  32. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    2,407
    Yeah but sazh is unique ;)

    [​IMG]

    even Dazh has good variation of the same hair model, given nobody give thought to what afro hair looks like, you will help make a breakthrough in hair design in game if you can mimick their model, ie You could be the most advance hair solution ever!
    [​IMG]
     
    Last edited: Oct 1, 2016
  33. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    455
    Hum, maybe I could do a kind of hair metaball... :p
     
  34. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    2,407
    It's nothing like that, it's more like tree shader

    [​IMG]

    That's why I told you to find the model rip to study, It's nothing like blob or whatever, you can make something compatible, you are almost half way there ;) There is a definitive pattern of placement.

    It's a shame that Japanese who almost never see coarse hair in their life had a better grasp of technique to achieve them.
     
  35. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    455
    the metaball system could be a tool for creating the volume, instead of painting all the strands, then the finale mesh would look like this :)
     
    wetcircuit likes this.
  36. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    2,407
    Yeah but I'm still not sure it would be great, coarse hair is still hair, it is organized in strand, disclaimer I haven't that type of hair. The thing is that this one is just one type of hairstyle, you can do many hairstyle with coarse hair.

    I have collected a few image for reference.
    https://www.pinterest.com/ether_n_aile/hair/

    Strand still reveal themselves in most hairstyle, the difficulty is to make their volume and tight curly nature reveal themselves, but half of that is the texture.
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
     
    Last edited: Oct 2, 2016
    Ony, wetcircuit and kalagaan like this.
  37. eldarune

    eldarune

    Joined:
    Nov 14, 2013
    Posts:
    8
    Kal i like it so much i decided to buy it after you add the cut/shorten tool . Do you have any performance test because i think i will use it a lot, for the furry enemies .
    For the main characters i want to create the general hair with this and i will add some alpha cards manually to enrich it.

    There is an example in the link made by the top visual artists of the world.They do it strand by strand manually.

    https://www.artstation.com/artwork/JOY4A
     
    Last edited: Oct 3, 2016
    kalagaan likes this.
  38. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    455
    Really nice references, thank you.
    I'll work on this ;)
     
  39. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    455
    The performances depends of :
    - the number of hair strands you'll paint
    - the hair density in the material properties
    - the shadow resolution (light parameter)

    Note : When all the layers are done, you can add the 'LOD Group' component for switching between layers.

    I'll add a length brush soon, what kind of effect do you need for the cut/shorten ?

    Thank you for the references :D
    One of the next step will be a full control of each strand curve. I hope I'll be able to create these kind of hair cut!!!
     
    Last edited: Oct 4, 2016
    neoshaman likes this.
  40. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    455
    Here a test : 10 characters with fur (more than 12000tri) 60fps
    [​IMG]
     
    julianr, neoshaman and eldarune like this.
  41. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    2,407
    The actual paper where they explain how they did it is there
    http://advances.realtimerendering.com/s2016/
    direct link (pptx):
    http://advances.realtimerendering.c...olumetric-based Materials in Uncharted 4.pptx

    The Process of Creating Volumetric-based Materials in Uncharted 4
    [​IMG]

    Abstract: With hardware limitations, creating complex, volumetric-based materials like hair and fabric has always been difficult for real-time rendering. In this talk, we will present examples of different approaches that we had at the early stage of setting up the shading pipeline. We learned some of the key elements that used for character shading in animated movies, and tried to implement a similar realistic appearance in-game:

    -Precomputation of self-shadow information for opaque and translucent materials

    -Scattering materials with a varied range of colors

    -High resolution of surface details

    We will also cover the lessons that we learned during production of Uncharted 4, how we chose to refactor and pare down certain shading elements already implemented in order to improve the efficiency of resulting GPU techniques while maintaining comparable render quality.

    Presenter:
    Yibing Jiang (Naughty Dog)
    Bio:

    Yibing Jiang is currently a Senior Shading Artist at Naughty Dog, in charge of skin, hair, eyes, fabric and surface shading for all of the characters in Uncharted 4. Her professional experience includes projects for Naughty Dog, Pixar Animation Studios, Walt Disney Animation Studios, and Ready at Dawn Studios. Projects: Uncharted 4, The Order 1886, Wreck it Ralph, Monsters University and Cars 2. Before that, she got her Master of Fine Arts from School of Visual Arts and Master of Engineering from Wuhan University of Technology.
     
    kalagaan likes this.
  42. eldarune

    eldarune

    Joined:
    Nov 14, 2013
    Posts:
    8
    wow nice
     
  43. kurotatsu

    kurotatsu

    Joined:
    May 10, 2012
    Posts:
    589
    The ponytail option, and long hair options, have my interest for samurai hair, I can't wait to see this asset grow.

    I'll pick it up and try it for sure.
     
  44. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    455
    I'm working on it :)
    It will be a new kind of layer, with procedural tools for generating poneytails.
    You'll be able to generate many poneytails on the same layer with different settings.

    I've done a lot of optimisations in my scripts for adding new hair generators easily :)
    I hope to release the poneytail next week!
     
    kurotatsu likes this.
  45. mysticfall

    mysticfall

    Joined:
    Aug 9, 2016
    Posts:
    470
    Does it support Linux? I just purchased it and opened the demo in my Linux box, but everything is shown as a big pink mass.
     
  46. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    455
    Hi,
    I didn't tried with a linux computer, but it should work...
    The shaders are compatible with android (shader model 2).
    You should have some messages in the console, try to reimport the shader folder.
    Send me the messages (contact@kalagaan.com), we will find a solution ;)
    Sometimes the cg compiler crash for syntax on a specific platform... :confused:

    I'll try it with Virtualbox ;)

    Edit : try to force the shader to SM 3 in HairDesigner_Procedural.shader
    CGPROGRAM
    #pragma target 3.0

    I'll do a fallback for target 2.0
     
    Last edited: Oct 8, 2016
  47. mysticfall

    mysticfall

    Joined:
    Aug 9, 2016
    Posts:
    470
    I tried to reimport the shaders and I think I found the culprit.

    It says it could not import 'unityCG.cginc', but the actual file name is 'UnityCG.cginc' on my installation. After I made a symlink as a workaround, the demo started to work correctly. Perhaps it worked on Windows where the file system doesn't care about cases.

    Now, I feel happy that I've purchased the only particle hair plugin that actually works on Linux :)

    Thanks much for the great product and quick support!

    P.S.: Found another error message now. Not sure if it's anything severe:
    Code (CSharp):
    1. Shader error in 'HairDesigner/Standard': 'normalize' : cannot resolve function call unambiguously (check parameter types) at (path)/HairDesigner/Shaders/HairDesigner_Standard.cginc(16) (on opengl)
    2.  
    3. Compiling Vertex program with DIRECTIONAL SHADOWS_OFF LIGHTMAP_OFF DIRLIGHTMAP_OFF DYNAMICLIGHTMAP_OFF
    4. Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING SHADER_API_DESKTOP
     
    Last edited: Oct 8, 2016
    kalagaan likes this.
  48. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    455
    Nice! thank you for the feedback!
    I'm happy that it works as expected!!!
    I've changed the include line :)

    I try to create code that work on all platforms, sometimes it's complicated, but the code is more reliable :)

    Note : I've already fixed the 'normalize' error ;)
     
    mysticfall and neoshaman like this.
  49. br20o0ly

    br20o0ly

    Joined:
    Aug 9, 2015
    Posts:
    16
    dose this work with UMA 2 ?
     
  50. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    455
    Hair Designer works in editor mode, it allows to paint hair on MeshRender and SkinnedMeshRender.
    UMA use its own way to render the characters, so it won't work until you find a way to convert the character to a mesh and use a unity renderer.
    You could also create some hair cut on an invisible mesh and link it to the a head bone of your character.
     
    neoshaman likes this.