Search Unity

Hair Designer - Dynamic hair & fur tool

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

  1. athosrojas

    athosrojas

    Joined:
    Jun 26, 2017
    Posts:
    76
    Hello, I am 3d character designer, and I use the hair designer as a hair creation tool. and use unity for rendering 3d animations. My question is, how to create a separate project just to file my hair creations. in a character without animation. and then apply the script to the same character in another project with a complex multi-camera animation done on the timeline. or even possible interactive VR projects, the idea is separate projects just to create hair and reuse in other unity projects. obs ... I'm not a programmer but a designer. I use third party scripts to generate more visual and simple applications and interactions thx for this amazing tool
     
  2. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,502
    You can export each haircut as a runtime layers in a project folder. Then you'll have to export this folder in a unity package.
    You'll be able to import this package into another project and you'll have to load the haircut at runtime using the loader script. ;)
     
  3. athosrojas

    athosrojas

    Joined:
    Jun 26, 2017
    Posts:
    76
    sorry but i dont undestand. :( export as runtime layer is store into a prefab?? and put it on a folder export as package?
     
  4. athosrojas

    athosrojas

    Joined:
    Jun 26, 2017
    Posts:
    76
    i see how to export as a runtime layer but, when i use the loader script "hair designer runtime loader" nothing happens :(
     
  5. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,502
    You have to drag & drop the haircut prefab in the list of the runtime loader in the inspector. The haircut will be loaded when you'll hit the play button of the editor.
    I'll improve the runtime layer section in the documentation.;)
     
  6. athosrojas

    athosrojas

    Joined:
    Jun 26, 2017
    Posts:
    76
    please can you show it step by step with pics when you have time? thx
     
  7. GCatz

    GCatz

    Joined:
    Jul 31, 2012
    Posts:
    282
    can I use the same hair for two different meshes (with different head size) at runtime?
     
  8. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,502
    Sorry, I'm on vacations without my laptop, but I'll do some screenshots next week. ;)
     
  9. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,502
    No, you can't, the haircut is based on the original mesh. If you need to share haircuts, you should use a scalp mesh on another gameObject.
     
  10. Qleenie

    Qleenie

    Joined:
    Jan 27, 2019
    Posts:
    867
    Hey @kalagaan , after updating to latest 1.7.1, i get the following error and my hair which is loaded by runtime layer is not rendered anymore:

    MissingReferenceException: The variable m_hairMeshMaterial of HairDesignerGeneratorMesh doesn't exist anymore.
    You probably need to reassign the m_hairMeshMaterial variable of the 'HairDesignerGeneratorMesh' script in the inspector.
    Kalagaan.HairDesignerExtension.HairDesignerGenerator.UpdateInstance () (at <273ded4a4cfa4bc290e21032f64102a9>:0)
    Kalagaan.HairDesignerExtension.HairDesignerGeneratorMeshBase.UpdateInstance () (at <273ded4a4cfa4bc290e21032f64102a9>:0)
    Kalagaan.HairDesignerExtension.HairDesignerBase.Update () (at <273ded4a4cfa4bc290e21032f64102a9>:0)


    I did update by deleting HairDesigner folder and do a new import. Reverting back to old HairDesigner let the hair appear again.

    Edit: I tested with just updating, this seems to work.
     
    Last edited: Oct 22, 2019
  11. GCatz

    GCatz

    Joined:
    Jul 31, 2012
    Posts:
    282
    if you support uma and blendshapes then didn't you found a way to support different mesh sizes ?

     
  12. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,502
    You can resize the gameobject, it wiĺl work. But you have to use the same mesh, the skinning data are based on the original mesh.
     
  13. OfficialHermie

    OfficialHermie

    Joined:
    Oct 12, 2012
    Posts:
    585
    @kalagaan Did you see the Lux Essentials for URP?
    I have fallen soooo much in love with it. It contains a beautiful hair shader.
    This way, we can have great hair shading with LWRP / URP, and not only in HDRP.
    Do you think you can support it in Hair Designer?
     
  14. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,502
    You can use other shaders with HairDesigner ;)
    You can drag & drop any material in the 'Material tab' of the HairDesigner inspector.
     
  15. OfficialHermie

    OfficialHermie

    Joined:
    Oct 12, 2012
    Posts:
    585
    I was hoping you could introduce a preset for Lux Essentials. If we select this preset and generate the textures, they would automatically be in the format / packing that Lux Essentials expects. This would be a huge time saver.
     
  16. OfficialHermie

    OfficialHermie

    Joined:
    Oct 12, 2012
    Posts:
    585
    Can you please advise how to use the "HairCutDemo_AtlasShader" in Unity LWRP 2019.2.2f1?
    Unity does not automatically upgrade the pink texture.
    Thank you!
     
  17. OfficialHermie

    OfficialHermie

    Joined:
    Oct 12, 2012
    Posts:
    585
    Can you please ALSO advise on how to use Hair & Fur Designer with HDRP? I have opened "HairDesigner_HDRP_2019", but nothing changed.
     
  18. Ruberta

    Ruberta

    Joined:
    Mar 5, 2019
    Posts:
    114
    @OfficialHermie

    LWRP => There is no shader specific for HairDesigner in LWRP/URP yet but you can drag & drop any material in the 'Material tab' of the HairDesigner inspector.

    HDRP => There is packakge name HairDesigner_HDRP_2019 in addon folder. After you import the package, there is folder for HDRP with sample scene. You can start from that. HDRP is only support hair atlas now.

    I still highly hope fur for HDRP will come soon. :)
     
    OfficialHermie likes this.
  19. OfficialHermie

    OfficialHermie

    Joined:
    Oct 12, 2012
    Posts:
    585
    @Ruberta Thank you.
    @kalagaan It would be REALLY, REALLY nice if you could find a solution for Lux Essentials (LWRP / URP). The author creates shaders since many years for Unity already, and his work is really profound.
    Do you think you could somehow make HairDesigner and Lux Essentials work together smoothly?
    For LWRP / URP I will use Lux Essentials in the future, and I think many others will do, too, because it fills the gap between HDRP and LWRP: It provides hair and skin shaders based on the HDRP, just for URP / LWRP.

    Also, if anybody else has found a convinient way to make Lux Essentials and HairDesigner work together in URP, please let me know, thank you!
     
    Last edited: Oct 27, 2019
  20. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,502
    I'll create my own shaders for URP ;)
    I don't understand what is the issue for using Lux with HairDesigner?
    You can use another material for the haircut. If you need specific textures, the author of the shader should provide the way to generate them.
     
    Last edited: Oct 28, 2019
  21. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,502
    Thank you for answering ;)
    I'm back from vacation, so I'm going to work on the fur shader, I'll update the package asap :)
     
    Ruberta likes this.
  22. OfficialHermie

    OfficialHermie

    Joined:
    Oct 12, 2012
    Posts:
    585
    If you create your own shader for URP then it's just perfect. Then I don't need Lux for the hair shading. Thanks!
    Can you perhaps already estimate when it will be ready?
     
  23. OfficialHermie

    OfficialHermie

    Joined:
    Oct 12, 2012
    Posts:
    585
    Can you also advise me on how to best use HairDesigner in its current state with URP?
     
  24. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,502
    I have to finish the HDRP shaders, so I don't know yet when I'll do the URP conversion.
     
  25. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,502
    You can drag & drop the URP material to the material slot of the HairDesigner inspector.

     
  26. OfficialHermie

    OfficialHermie

    Joined:
    Oct 12, 2012
    Posts:
    585
    I mean in the following scene / material settings.
    This is "HairCutDemo_AtlasShader" opened in URP Unity 2019.2.2f1.

     
  27. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,502
    This scene is not ready for URP, you have to change all the materials manually.
    You have to select the 'head' gameObject, and drag & drop a compatible material (using a URP shader) for each haircut in the HairDesigner inspector.
    You also have to change the material in the meshRenderer (head and eyes) with a URP shader.

    When HairDesigner will be ready for URP, I'll add an addon including a compatible scene.
     
    OfficialHermie likes this.
  28. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,502
    HDRP fur WIP

    Now the brush data are compatible with the shader :)
    I can create weird design like this :D

     
    Ruberta likes this.
  29. wetcircuit

    wetcircuit

    Joined:
    Jul 17, 2012
    Posts:
    1,409
    I'm sure this was answered before, but will there be an SRP version of this fur?

    (it looks amazing)
     
  30. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,502
    yes, I'll convert the shaders to the new URP later ;)
     
    wetcircuit likes this.
  31. OfficialHermie

    OfficialHermie

    Joined:
    Oct 12, 2012
    Posts:
    585
    Hello! I'm starting HairDesigner again and again. I simply don't use it so often yet.
    I'm having a hard time every time I start it again.
    To document my trouble, I have recorded this video:
    .
    My 2 problems are:
    1) After I select the type of hair ('Long/Fur" in my case), the HairDesigner selects the "Material" tab.
    This confuses me: Why does it ask / offer me to do something with the material? I thought I have to paint hair on the mesh first
    2) When I try to paint hair onto the mesh, nothing happens. I think this is not specific to HDRP, I have experienced this without HDRP before, I think.
     
  32. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,502
    1) Every time the design mode selected, the mesh is generated, so it's a specific mode that you have to select when you need to modify the haircut. Maybe I should set it as the default tab for the first time. ;)

    2)You have selected a long hair layer, you have to hold 'ctrl' and click on the surface for generating the curve. There's some tips in the HairDesigner panel.
     
  33. OfficialHermie

    OfficialHermie

    Joined:
    Oct 12, 2012
    Posts:
    585
    1) Thanks for considering to make "Design" the default tab when no hair has been drawn yet as this confuses me every time.
    2) Thanks: Yet another thing that I always stumble over each time I start again with HairDesigner: I try to draw the hair using Ctrl + dragging.
    Instead I have to use Ctrl + a single click.
    Of course one can get used to everything, but it confuses me.
    Especially the fact that the hair is drawn at a mouse up and not on a mouse down.
    It just feels weird. But as I said: One can get used to everything.

    ps: Sorry for being a bit harsh. I never totally get a hang with HairDesigner although I love the results that you present so much. So I try to figure out where exactely the problems occur for me. Perhaps my problem discussion is actually helpful?
     
    Last edited: Oct 31, 2019
  34. Qleenie

    Qleenie

    Joined:
    Jan 27, 2019
    Posts:
    867
    Hi @kalagaan
    I have a few general questions about runtime layer:
    1) what is the advantage of using runtime layer? is it only portability, or also performance?
    2) do we need to use runtime layer in a build, or can we just use the "normal" hair designer component?
    3) I want to change properties during runtime, mostly colors of the shader, is it possible? also with runtime layer?

    Thanks!
     
  35. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,502
    Any feedback is useful ;)
     
  36. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,502
    1) If your character has many haircuts, it will only load the one needed. so you'll have better performances.
    2) The runtime layer is optionnal, it just loads the same data than the original haircut.
    3) You can use the runtime layer with the HairDesigner API. ;)
     
  37. Qleenie

    Qleenie

    Joined:
    Jan 27, 2019
    Posts:
    867
    thx for fast answer, always appreciated: one detail question to 1): would it not be the same if I deactivate the layers in the hair designer component? I guess deactivated ones are not being loaded, or at least they should not take processing power ? or is there an overhead to tose ones ? I saw that the corresponding game objects are also being deactivated, if we deactivate a layer.
     
  38. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,502
    The desactivated layers are loaded in the scene, so if you need to switch between layers it will be faster than loading a new runtime layer, but the mesh and textures will be already loaded in memory.
    So it depends of your needs ;)
     
  39. Qleenie

    Qleenie

    Joined:
    Jan 27, 2019
    Posts:
    867
    cool, thx, that's what I thought; it needs more memory, but processing resources should be same between runtime layer and activated / deactivated layers in Hair Designer. Guess I'll stick to second then, as it's more convenient, esp. for updates to designs. Thanks again! Really enjoying the tool now, esp. with latest update for long hair :)
     
    kalagaan likes this.
  40. GCatz

    GCatz

    Joined:
    Jul 31, 2012
    Posts:
    282
    idea for feature, why not add save layer parameters into json/binary file
    and load button so we can use the files in other layers to paint with

    so we can use your beautiful examples to paint our mesh or share/sell hair layers
     
    OfficialHermie likes this.
  41. OfficialHermie

    OfficialHermie

    Joined:
    Oct 12, 2012
    Posts:
    585
    Can you advise me again, please?
    What am I missing in this video?
    I think I'm done, but the hair doesn't show.
    If it's written in the manual, please just point me to it, but I don't see what I'm missing to make the hair finally show.
    Thanks.
     
    Last edited: Nov 2, 2019
  42. OfficialHermie

    OfficialHermie

    Joined:
    Oct 12, 2012
    Posts:
    585
    Buying hair layers sounds amazing! I don't have enough dedication + time + fun to create good layers myself.
    I would gladly buy them as well as ready-made strands. Anything that makes it easier / quicker / cooler would be highly appreciated!
     
  43. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,502
    You have to toggle on the HDRP checkbox in the Texture generator ;)
     
  44. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,502
    I'll think about a way to create a generic scalp ;)
     
  45. OfficialHermie

    OfficialHermie

    Joined:
    Oct 12, 2012
    Posts:
    585
    You should perhaps mention this in the docs.
     
  46. OfficialHermie

    OfficialHermie

    Joined:
    Oct 12, 2012
    Posts:
    585
    Here is yet another video.
    In this video, I press Ctrl + left mouse to create a hair strand, but nothing happens.
    Do you see anything obvious why this is so? I have also restarted, but that wouldn't change anything.
     
    Last edited: Nov 2, 2019
  47. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,502
    Could you send me an email with your model?
    I could have a look.
     
  48. OfficialHermie

    OfficialHermie

    Joined:
    Oct 12, 2012
    Posts:
    585
    I did.
     
  49. GCatz

    GCatz

    Joined:
    Jul 31, 2012
    Posts:
    282
    even just polygon + material parameters will be great, then we just repaint the new hair on our mesh
    common scalp is maybe too hard with all the use cases (beards, hand hairs, etc..)

    but its great as it is now, works nice for me (common scalp with mesh rebuild)
    we can share layers like a brush to paint for yourself and not a complete hair set

    opens the door for more asset store sellers that will sell hair layers (like people selling GUI skins),
    and more exposure to this awesome tool from people stumbling these sales/demos

    I would buy some for myself

     
  50. OfficialHermie

    OfficialHermie

    Joined:
    Oct 12, 2012
    Posts:
    585
    Is it possible to create such hair strands with HairDesigner?