Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

HairStudio - beautiful hair, now in Unity !

Discussion in 'Assets and Asset Store' started by methusalah999, Apr 2, 2020.

  1. Gatskop_Software

    Gatskop_Software

    Joined:
    Sep 21, 2014
    Posts:
    74
    Aaa I just buy the asset and did not see it does not support URP :-( any plans for this and if yes when ?
     
  2. methusalah999

    methusalah999

    Joined:
    May 22, 2017
    Posts:
    416
    URP support is in active development. The incoming release won't include it but the next one will, most likely.

    I can't give any precise ETA but I guess a month or two.

    In the meantime I can also provide alpha version if you are interested.
     
  3. Gatskop_Software

    Gatskop_Software

    Joined:
    Sep 21, 2014
    Posts:
    74
    Please can I work with the alpha, for now, I did send you email and invoice number
     
    methusalah999 likes this.
  4. narendranj

    narendranj

    Joined:
    Aug 5, 2018
    Posts:
    1
    This is an amazing asset, brilliant and beautiful. when can we expect to see fur support?
     
  5. methusalah999

    methusalah999

    Joined:
    May 22, 2017
    Posts:
    416
    Thanks for the kind words.

    Fur is indeed in the backlog but there is no plan or ETA for the moment. One of the particularity of HairStudio is that each hair strand is simulated individually, which may be a little overkill for a fur. So fur support will require some deep refactoring.
     
  6. local306

    local306

    Joined:
    Feb 28, 2016
    Posts:
    147
    @methusalah999 I noticed that the minimum Unity version for this asset is 2019.4. Is this because it was submitted with that version, or is there something specific from that version onward needed to run the asset? Curious whether I'll run into issues if I attempt to import into an older version (2019.3.6 is where I'm currently at).
     
  7. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,111
    OMG I just found this jewel!

    since I'm an animal lover :) how hard is to use it for Furry animals... like a wolf for example ^_^
     
  8. DeltaTech

    DeltaTech

    Joined:
    Oct 18, 2016
    Posts:
    8
    Hey there! I was wondering if the hair created could be saved as prefabs and applied to many characters. I also wanted to know if it was possible to use a hair shader for the hair from another pack if you chose to. And lastly is there a way to turn off physics if you don't want it? I ask all these as I plan on creating a bunch of hair prefabs so players can chose and customize the look and hair they would like (as well as maybe facial hair) And I plan on using HDRP with a great hair shader I had gotten a while ago. Wanted to know if all this was possible, thanks!
     
  9. methusalah999

    methusalah999

    Joined:
    May 22, 2017
    Posts:
    416
    Hi and thanks for your interest ^^

    Support for fur is not yet implemented. Currently, one hair style is attached to one gameobject and the hair won't move with the faces of a skinnedmesh. This is the main problem and I beleive it is not a very big deal to implement it. Some good c# and shader skill will be required.

    Of course, if your model is not a skinned mesh (stylised with primitive shapes for example), then HairStudio is usable as-is.

    The second issue you may face is performance, as a fur is made of way more hair strands than a human hair style. HairStudio simulates physics for each hair strand individually for the most realism, which may be a little overkill for a fur. Some optimisation may be required to get better perf. Such optimisation will require to dive deeper in HairStudio code.
     
    Malbers likes this.
  10. methusalah999

    methusalah999

    Joined:
    May 22, 2017
    Posts:
    416
    Hair styles can be saved in prefab indeed and used for many characters.

    The shading of HairStudio is very specific and you can't replace it by another shader. You can modify the code of the shader of course (and I can help with that). Also, the HairStudio shader contains a lot of parameters, and can create a wide variety of effect, both realistic and not. Textured and multicolored style are not yet supported.

    It is possible to lock the hair and deactivate all physic simulation, which also lead in a big gain in performance.

    about facial hair, not that in the current HairStudio version, hair roots won't move when the faces of your mesh move (with blendshapes or a bone). This feature is in the todo list but I can't provide any ETA on that.

    About the HDRP, support for this render pipeline is in active developpment but it's not possible for the moment. HairStudio hair geometries are not made of surfaces, but are considered as fibers. HDRP does not allow that in any way for the moment.
     
  11. methusalah999

    methusalah999

    Joined:
    May 22, 2017
    Posts:
    416
    I'm not sure what the minimum version required is. the only thing that is not backward compatible is the Unity job system. Unity uses the latest version of the job system, which has been release in a late 2018 version (2018.3 I beleive).

    Any 2019 version should be ok. If you have the opportunity to test, please give my some feedback!
     
  12. local306

    local306

    Joined:
    Feb 28, 2016
    Posts:
    147
    I brought it back into 2019.3.6f1 and it seems fine for now. The editor wouldn't allow me to download it to that version since it says on the page 2019.4 and up. But yeah, seems to be working.
     
  13. methusalah999

    methusalah999

    Joined:
    May 22, 2017
    Posts:
    416
    I will take a closer look on the allowed versions on the next update. Thanks for the feedback.
     
  14. razzraziel

    razzraziel

    Joined:
    Sep 13, 2018
    Posts:
    169
    Looks pretty much like Ornatrix but in realtime, good work. Is there any plans for hair cards? Since most AAA games use hair cards, it would be good to have both photorealistic look and good physics in one. Strands are good in physics but you cant make them look like Aloy's hair :) They are just too thick to look realistic up close (mid and far distances are acceptable). So an adjustable hair card solution would be killer, since it already generates billboards, its quite possible to make it. So this way users who wants to use hair cards, can use all kinds of hair textures too (Alpha, flow, ramp, depth etc). But i dont know how that would effect performance tho :)

    Also please consider supporting 2019.1 or at least 2019.3
    2019.4 and above is a big barrier to prevent buying.
     
  15. chrisabranch

    chrisabranch

    Joined:
    Aug 15, 2014
    Posts:
    125
    2020.1.0f1 is out of beta... Hopefully, HDRP will follow :)
     
    methusalah999 likes this.
  16. DeltaTech

    DeltaTech

    Joined:
    Oct 18, 2016
    Posts:
    8
    Hey man! thanks for the reply! I believe ill have to pass up on the asset for the time being. Thanks for all the input!
     
    methusalah999 likes this.
  17. methusalah999

    methusalah999

    Joined:
    May 22, 2017
    Posts:
    416
    Hair cards would require a dedicated workflow. You do not control how the geometry is generated, except for the combing/cutting and the thickness of the cards. So you would have to produce and input a special texture with various strands drawn vertically, then indicate the number of pixels representing the width of each strand on your texture.

    At the moment, strands are one-faced billboard quads facing the camera with a uniform color. An alternative shader could create two-faced quads, facing outward the scalp (or a random direction?). It would choose a random strand on the texture and apply it using alpha. The light shading could be the same.

    Seems doable but it will require that cards to be very thin for the physic to remain beleivable. the hair strand/card twist may also be a problem. Also, at mid/far distance, the antialiasing will most likely fail and the alpha of the texture may produce a disturbing noise in the hair volume.

    But you are right, it's worth a try!

    About the compatibility, HairStudio actualy supports all 2019 versions, but the asset configuration on the store is bad. I will fix that on the next update.
     
    razzraziel likes this.
  18. Davood_Kharmanzar

    Davood_Kharmanzar

    Joined:
    Sep 20, 2017
    Posts:
    388
    @methusalah999

    hi dear,

    great work :]

    but, it would be great if using Burst for simulations to getting fastest performance on all platforms ;]
     
  19. methusalah999

    methusalah999

    Joined:
    May 22, 2017
    Posts:
    416
    I don't know much about it. Could you give me details?
     
  20. r3ndesigner

    r3ndesigner

    Joined:
    Mar 21, 2013
    Posts:
    134
    Hey Benoit Dumas sorry to ask it again, but now with the promo i need to ask xD, the answers from the help thread about hdrp helped?
     
    methusalah999 likes this.
  21. leslviv

    leslviv

    Joined:
    Jun 22, 2019
    Posts:
    9
    Hi. I'm very interested in this product and it looks awesome based on available videos, but unfortunately the only long hair video that I could find was missing a body. Why is that?
    I'm ready to buy it literally right now if you show me a running back and forward, jumping, moving left and right girl character with long hair (way bellow neck). I would like to see how you can make it interact with other body parts like back and shoulders for example.
    We can Zoom anytime or you can just upload another video. I will greatly appreciate the efforts and will support you immediately if it still gonna be so awesome. Thanks.
     
  22. methusalah999

    methusalah999

    Joined:
    May 22, 2017
    Posts:
    416
    Here is a long hair style with collisions from the showcase scene, and a video showing more extreme collisions using 200 colliders as a stress test.

    Tell me if you want to see anything else.
    34 long hair.gif
     
  23. Kemp-Sparky

    Kemp-Sparky

    Joined:
    Jul 7, 2013
    Posts:
    72
    I am quite interested in this asset, but I would primarily be interested in using it for fur, since both of the projects I am currently working on heavily feature animals, and I am quite happy with my traditional mapped card hair for my humans. I see you've mentioned that you have no ETA for that feature yet, but it has been requested a few times since then, any chance this feature has been bumped up the list?

    Another feature I would like to see is for the shader to be able to sample the parent model's texture for strand colour. I'm thinking of patterned animals, of course, but it would also be very helpful for blending the strand hair with a skullcap texture for realistic hairlines and parts. Since getting a good hairline with realtime strand based hair is always problematic.
     
  24. methusalah999

    methusalah999

    Joined:
    May 22, 2017
    Posts:
    416
    Fur is indeed requested a lot and I will consider moving it up in the todo list. About the color sampling from the model's texture you are totally right, it will be required for a true fur support, as many other things.

    For a human hair, though, I can't see the point. Could you give more details about it? maybe examples?
     
  25. unity_0JCf0BEYAnGSnw

    unity_0JCf0BEYAnGSnw

    Joined:
    Feb 7, 2020
    Posts:
    4
    Hello all!

    What i doing wrong?
    2018.4.23
    upload_2020-7-27_18-41-47.png
     
  26. reggie_sgs

    reggie_sgs

    Joined:
    Jun 29, 2014
    Posts:
    232
    I just saw your product and we're currently looking for a hair solution for our upcoming PS5 game. It looks like this is mainly a shader and not something that can create an actual hair mesh. Is it possible to export the hair as a mesh? Our game is in VR and will have a lot of characters on screen at times so we need to fall back to hair meshes for characters not close to the camera.
     
  27. methusalah999

    methusalah999

    Joined:
    May 22, 2017
    Posts:
    416
    Seems like the mobile hair nodes aregare to the world origin. I need more details to understand what's happening:
    - version of unity
    - version of hair studio
    - hardware (computer and GPU)
    - have you done anything or did you just run the showcase scene?
     
  28. methusalah999

    methusalah999

    Joined:
    May 22, 2017
    Posts:
    416
    The hair mesh can't be generated because it is composed of billboards that are facing the camera, updated each frame.

    Even if you could, a mesh with millions of vertices wouldn't be faster than what's HairStudio bake in real time.

    The hair can become very sparse and thick at distance, thanks to the LOD system included in HairStudio, and you can also lock the physics simulation when a player is far away to enhance performance.

    Also, a distant hair will be represented by few pixels, which causes the shader to work faster.

    Finally, you can also switch to another HairStudio hair manually at a certain distance if the LOD is not sufficient.

    How many characters do you plan to have?
     
  29. unity_0JCf0BEYAnGSnw

    unity_0JCf0BEYAnGSnw

    Joined:
    Feb 7, 2020
    Posts:
    4
    Thx for answer.

    - unity version as said befor - 2018.4.23
    - import without any errors
    - demo scene (showcase)
    - last version of hair (today we bought and download)
    - GTX 1050TI (4gb) i7 8750H

    upload_2020-7-27_23-5-3.png
     
  30. methusalah999

    methusalah999

    Joined:
    May 22, 2017
    Posts:
    416
    Everything seems to be ok, thanks for the details and sorry for the inconvinence. I have tested HairStudio with Unity 2018.4.25 without issue.

    1/ Are you using a Mac or PC?

    2/ Can you confirm that you are not using SRP in your project? HairStudio only supports the built-in rendering, URP and HDRP won't work.

    3/ Can you please show me a picture of the first pedestal and another of the pedestal named "22 - Colliders" while in play mode?
     
  31. unity_0JCf0BEYAnGSnw

    unity_0JCf0BEYAnGSnw

    Joined:
    Feb 7, 2020
    Posts:
    4

    Using PC. Built-in rend

    Shot video:


    Seems like nothing work

    version 2019.3 (try all of them - 2018.4, 2019.2, 2019.3)

    Do u have different packedge for different versions of unity?

    Colliders:
    upload_2020-7-28_12-0-7.png
     
  32. methusalah999

    methusalah999

    Joined:
    May 22, 2017
    Posts:
    416
    Thank you very much. I have already had that bug in the early stage of the latest version but it is resolved since a long time. I'll try and reproduce it to understand what's happening.

    In the meanwhile I will send you the previous version of HairStudio v1.1, I think this one will be ok.

    Again sorry for the inconvenience and thank you for the report.
     
  33. unity_0JCf0BEYAnGSnw

    unity_0JCf0BEYAnGSnw

    Joined:
    Feb 7, 2020
    Posts:
    4
    Oh, thank u! Hope you will fixe this bug=)

    We are waiting for 1.1
     
  34. reggie_sgs

    reggie_sgs

    Joined:
    Jun 29, 2014
    Posts:
    232
    We'll have between 60 and 120 characters on screen at the same time.

    I watched through the videos and it looks like you have some control over stiffness but I didn't see too many difference in the hair styles. We need something that will give us some flexibility in the hair styles we create.

    I saw one example of a man with short hair but we'll need something that can make a WW2 GI style haircut. If you do another set of example videos, it would be great to see one of those as well as some variations on the types of women's hair styles you can make.
     
  35. methusalah999

    methusalah999

    Joined:
    May 22, 2017
    Posts:
    416
    120 characters is indeed a lot. Here is a stress test.
    upload_2020-7-28_23-57-55.png

    I think it is possible to get very good results even with such a great number of heads, by fine tuning the hair styles and scripting the level of detail. But in any case, this will be a big budget in your GPU time, at the cost of other visual features of your game.

    Now, even if the hair mesh is not obtainable natively from HairStudio, it is definitly possible to add a script that will take a snapshot of the generated geometry and produce hair cards out of it. Getting the snapshot is trivial and I can help with that. Producing the cards is also trivial as it is exactly the same code that is used to produce the billboards facing the camera (creating a quad out of a segment). The main difference is that the card will need a normal, and this value does not exist currently in HairStudio, because hair strands are considered as fibers, not surfaces.

    Some solution I'm thinking about to compute this normal:
    - make it face outward the hair volume, from the center of the scalp. This will produce correct results in most situation but may fail on hair styles that have convolutions.
    - use the built-in up vector. This vector is set at each root, and propagated along the strand to keep a reference and avoid the strand to twist. It may also be correct in a lot of situations but maybe not.
    - choose any arbitrary normal and have a sufficient number of strand to get a correct approximation even if some cards are badly oriented.
    - generate 3 faced prisms instead of a cards, and select any normal you want.

    A good hair shader would still be required. It does not seem to be a big deal. Tell me what you think!

    About the stiffness, there are two parameters.

    The global stiffness makes the hair come back to it's original position relative to the scalp. This force is stronger at the root and weaker at the tip, and is non-realistic. Very usefull to preserve the hair style in any situation.

    The local stiffness makes each segment of the strands keeping its original angle relatively to the previous one. This force represent the shape memory of a hair strand. Imagine that the head is upside down and the hair is hanging due to gravity, a curve at the tip would still be present due to this force.

    At full strength, these two forces are producing the same result, forcing the hair back to its original style, but a mix is often necessary depending on the style, the animation, the motion speed, the desired effect... Also, these values can be changed during play mode to adapt to any special situation (less stiff when falling off a cliff or riding a motorcycle, stiffer during this fast animation to avoid having hair in the face, etc.)

    About the hair styles, I'm afraid I'm not artist enough to show you better style that I have already created for the promotion of HairStudio ^^ Hopefully this will change in the future if users are kind enough to send me some footages of what they have created but the asset is still young (released in april this year) and I haven't such content already. Of course, if you need more details about one of the creation tool please ask! I'm also very attentive to user feedback to enhance the creation tools and add more features on this part.
     
  36. reggie_sgs

    reggie_sgs

    Joined:
    Jun 29, 2014
    Posts:
    232
    On the player count, we won't need to do the physical rendering on all the players at the same time, we'll just have a budget and simulate the 10, 20, etc.. closest players or only the closest ones in view of the camera. We'll want to fall back to static meshes for all other players so that's why the conventional hair meshes are important.

    That script sounds ideal and I think that would work well. Once it generated a mesh, we could fine tune it in external software. It would be mainly for characters at a distance so it wouldn't need to be too detailed.

    The stiffness settings sound like what I was hoping for so that you could create distinct hair styles. I think the tool used to create the hair placement will be very important as you'll want to be able to easily shape the hair. In the videos it looked like you didn't have real exact placement and it seemed a bit random. If that were very flexible and easy to use, I think this would work for what we need.
     
  37. methusalah999

    methusalah999

    Joined:
    May 22, 2017
    Posts:
    416
    About the combing tool, it is indeed simple. It basically moves the affected guide's nodes according to the mouse motion and the current camera orientation. For example, it is not possible to move a node individually with a transform gizmo. Also, the guides are made of multiple segments and the nodes are not drawn, so it may be hard to locate nodes and predict if it will be affected by the tool when segments are aligned on the screen.

    An important feature that is not shown in the demo is the select tool. By default, all guides are selected but you can quicky select one or many guides instead. The combing/cutting tools will only affect them. In a future version, I also plan to allow saving selections for later use, so you can create groups of guides that are often combed together.

    These artist tools are inspired by the industrial tools like nGen, and there is definitly room for improvement. But I need to get some user feedback first, as I'm not an artist myself. For the moment, I have not received much and I suppose this tool set is decent as it is now and I focus on other, claimed features ^^
     
  38. methusalah999

    methusalah999

    Joined:
    May 22, 2017
    Posts:
    416
    Some HDRP progress! I've finaly achieved to get a correct scattering of the light in all situations.

    I confirm that the HDRP shading will be simpler than the buildt-in one, with less realistic features, but it will also be very fast and better intergrated in the rest of the scene lighting.

    I will continue to implement and test as many features as possible for HDRP, and I hope HDRP support to come before fall !

    upload_2020-7-30_15-43-11.png
     
    Weendie-Games and Bartolomeus755 like this.
  39. Bartolomeus755

    Bartolomeus755

    Joined:
    Jun 20, 2013
    Posts:
    257
    Looking forward to the HDRP version, great work so far.
     
    methusalah999 likes this.
  40. reggie_sgs

    reggie_sgs

    Joined:
    Jun 29, 2014
    Posts:
    232
    I'll be happy to give you feedback. I think getting the comb tool right will be key to it's usefulness. Any idea if the shader will work on the PS4/5? We're developing for both at the moment (HDRP on the 5) so that would be a requirement for us.
     
  41. methusalah999

    methusalah999

    Joined:
    May 22, 2017
    Posts:
    416
    I have no experience with PS4/5 but I beleive these platforms are both dx11 compatible so there should not be any issue.

    Note that HDRP support is at the top of the todo list but it is not yet present.
     
    Velo222 and reggie_sgs like this.
  42. Gatskop_Software

    Gatskop_Software

    Joined:
    Sep 21, 2014
    Posts:
    74
    Any news on URP got project waiting for this
     
  43. methusalah999

    methusalah999

    Joined:
    May 22, 2017
    Posts:
    416
    URP is almost ready but I still can't get shadows with the hair. This is the last issue.

    I don't know much about URP myself. I'm waiting for answers on the forum on the subject, but I can't get any for the moment.
     
  44. hecali_aj

    hecali_aj

    Joined:
    Sep 1, 2015
    Posts:
    15
    Hello,


    Currently experiencing the same bug as you. Good thing I made a backup.
     
  45. methusalah999

    methusalah999

    Joined:
    May 22, 2017
    Posts:
    416
    This bug has been reported and I have a fix for it. It will be in the next version that should be shipped this night or tomorrow. It occur only on some hardware, sorry for the inconvenience.

    In the meantime, you can debug it yourself easily:
    - go into HairSimulation.cs
    - line 144, delete one of the four lines that say "sizeof(float) * 3 +"

    Tell me if it's not ok.

    Ben
     
  46. hecali_aj

    hecali_aj

    Joined:
    Sep 1, 2015
    Posts:
    15
    It worked! Thanks for the great asset!
     
    methusalah999 likes this.
  47. hecali_aj

    hecali_aj

    Joined:
    Sep 1, 2015
    Posts:
    15
    Hello, I seem to be having a problem when I restart a scene that's using HairStudio.
    This is recorded using a Samsung Galaxy Note 3.


    Here's my code in reloading a scene.
     
  48. methusalah999

    methusalah999

    Joined:
    May 22, 2017
    Posts:
    416
    I don't know much about UnloadUnusedAssets and LoadSceneAsync, but here are some random info that may help.
    - HairDressing class will create the hair strand in it's awake method,
    - the generated strands are stored into compute buffers that are created in Start method and disposed during the OnDestroy method of the HairSimulation component.

    You need to ensure that the buffers are either kept completly, or correctly disposed and created again in the reload process. Could you please place some debug log in awake, start and destroy of HairSimulation and HairDressing to have a better understanding on what is going on?

    Also, I note that the motion of the head is also messed up. The little script responsible for it only changes local rotation and does not keep any data. It seems to me that after the reload, two scripts are fighting to change the object rotation to their own value, leading to the strange shaking. My best guess is that things are not unloaded correctly and new versions are added to them somehow.
     
  49. hecali_aj

    hecali_aj

    Joined:
    Sep 1, 2015
    Posts:
    15
    Here's the result of the debug logs on HairSimulation, HairDressing and my Restart component.

    Also, this bug only occurs on android and not on desktop. This bug also happens without using UnloadUnusedAssets and LoadSceneAsync. Just using a basic method of LoadScene using the current scene will produce this result in android.
     
  50. methusalah999

    methusalah999

    Joined:
    May 22, 2017
    Posts:
    416
    Thank you for the log. Everything to be as expected.

    The fact that it's working fine on the computer and fails on the android device is a bad news. I would start by disabling the hair completly and try to have a correct motion of the bust only. If the motion of the bust is still messd up when the hair gameobject is disabled, then it is a general Unity issue instead of a HairStudio issue. If disabling the hair leads to a correct bust movement on android, then HairStudio is most likely the culprit.

    I'm talking about the bust motion because it is made by the script DemoMovementGenerator, which is completly independant of the HairStudio code. Have you tried your scene reload script with any other game logic of yours on Android?
     
unityunity