Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Graphics [RELEASED] Hair Composer (nVidia HairWorks)

Discussion in 'Tools In Progress' started by Simod, Jan 26, 2017.

  1. johnartune

    johnartune

    Joined:
    Oct 18, 2016
    Posts:
    61
    Hello Simod,
    You said about the "Animator"&"Animation" with Frame rate Independent Rendering(FIR). Sorry for my ignorance I can't get the real reason why. If can't use character "Animation" system it seems should be created so much Animation controller.I think this is the most I care about, and the bad news, if the Cinema Director plugin couldn't receive Animation Controller.
     
  2. Simod

    Simod

    Joined:
    Jan 29, 2014
    Posts:
    176
    Wow, thank you for this! We did not even hope HC will work with such asset.

    Seems like Vertical Sync is enabled. Try to disable this in the main menu: Edit / Project Settings / Quality / V Sync Count

    To my knowledge Cinema Director plugin supports Animator just fine. Please could you clarify: what did you mean by "Cinema Director plugin couldn't receive Animation Controller"?
     
  3. johnartune

    johnartune

    Joined:
    Oct 18, 2016
    Posts:
    61
    Hello Simod,
    Disable the V Sync, then keep very high-level FPS in 300+.
    Thank you so much. Vsyne.jpg
    I'll try Animator in Cinema Director plugin yes I found the plugin supports Animator system, let me try next time.
     
  4. Simod

    Simod

    Joined:
    Jan 29, 2014
    Posts:
    176
    No problem. At least we know the actual performance now. You may fine tune the HcInstance, for better FPS too.
     
  5. johnartune

    johnartune

    Joined:
    Oct 18, 2016
    Posts:
    61
    Hello Simod.
    I'm thinking about birds feather. If could be let me replace hair & fur mesh to feather mesh covered skinned mesh.
    This is created with Fur Factory, still, have some issues.
    FurNormal.jpg FeatherElbow02.jpg FeatherElbow04.jpg
     
  6. Simod

    Simod

    Joined:
    Jan 29, 2014
    Posts:
    176
    Hi Johnartune,

    My best bet to use old school feather mesh and HairWorks in between. It will beautify (at expense of performance) the character for sure. But HairWorks likely can't replace all feathers.
     
  7. johnartune

    johnartune

    Joined:
    Oct 18, 2016
    Posts:
    61
    Hello Simod,
    Thanks to your suggestion.
    I'm still follow up the script of created feather(Perhaps it's better for birds feather in our projects.). In some detail use Hair Composer I think that's better.
     
  8. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    6,492
    HEllo, can this do hair like that?
     
  9. johnartune

    johnartune

    Joined:
    Oct 18, 2016
    Posts:
    61
    Hello neoshaman,
    I think Hair Composer could finish this hairstyle better than any other now.
     
  10. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    6,492
    I wonder, can it capture the varying circle, twist and turn in 3d that those strandf have? I have only see wavy and straight strands so far. I want to see! :D
    I'm struggling to replicate that style of hair!
     
  11. Simod

    Simod

    Joined:
    Jan 29, 2014
    Posts:
    176
    Hi there!

    Depends how close the hairs should be to the original. I did a quick test with an existing hair style and just distorted a few settings. You may also play with the settings in the demo.

    Hair Composer (Tech Demo) 2017-06-05 13-32-47-92.png Hair Composer (Tech Demo) 2017-06-05 13-34-34-87.png Hair Composer (Tech Demo) 2017-06-05 13-34-45-74.png
     
  12. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    6,492
    Ah! thanks :), but sadly it looks nothing alike lol, the strand are just straight hair shooting up, well I guess that I need to innovate now :oops: not much of a coder but I really need it ...
     
  13. Simod

    Simod

    Joined:
    Jan 29, 2014
    Posts:
    176
    Np :) Honestly I would suggest using old school mesh for that style of hairs. That will be performant and closer to the image.
     
    neoshaman likes this.
  14. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    6,492
    But no body know how to do it anyway, it's already hard with straight hair, there is plenty tutorial of various method for them, at various abstraction level, there is shader too. But nothing about this type of hair, and the one that do something only the "fro" (ironically I have posted an image close to thefro too) and they seems to only have ever seen that type of hair on tv because it only looks good to people who don't have this hair lol. I don't have it too, so that's less reference for me too, but I have live with people who had this hair. Also no shader have even thought about this hair type. Let's not even talk about physics.

    Damn it, it looks like a full research field LMAO.
     
  15. edan_kuva

    edan_kuva

    Joined:
    May 11, 2017
    Posts:
    3
  16. Simod

    Simod

    Joined:
    Jan 29, 2014
    Posts:
    176
    Hi edan_kuva,

    That is interesting finding, thank you.
    While Unity does not have CameraEvent for motion vectors, we could use CameraEvent.BeforeImageEffects, which is obvious and in theory should make a trick with:
    Code (CSharp):
    1. _commandBuffer.SetRenderTarget(BuiltinRenderTextureType.MotionVectors, BuiltinRenderTextureType.CameraTarget);
    Will try this later and let you know result.

    Also thank you for this request, yet there is no paid access. While the product is ready for public, it needs a license from nVidia's side. To our regret we can't force the things.
     
    johnartune likes this.
  17. johnartune

    johnartune

    Joined:
    Oct 18, 2016
    Posts:
    61
    Hello Simod,
    Sorry for so many times no feedback for you, because those days I had to finish a way to create birds feather & wing.
    Next Character will test not long, I'll send feedback more for you.
     
  18. Simod

    Simod

    Joined:
    Jan 29, 2014
    Posts:
    176
    Hello johnartune,

    It's okay, no hurry, keep working on your project, and should you need any improvement or help please let us know.
     
  19. zhangxinghao

    zhangxinghao

    Joined:
    Apr 28, 2017
    Posts:
    16
    HI,New friend,

    First,I'm Chinese, My English is not well, I am so sorry for this !

    I'm working on a hair style project. I tried some other plugins, but got some trouble.

    I want to make a "wavy hair" or "Wavy wavy hair" ^^.

    So I look forward to your hair works!

    I will send you some bugs in my work, Thank u very much!

    This is my E-Mail: unityjohnzhang@sina.com.

    Thx again .^^
     
    Last edited: Jun 9, 2017
  20. Simod

    Simod

    Joined:
    Jan 29, 2014
    Posts:
    176
    Hello, nice to meet you! :)

    Yes it supports wavy hair style.

    Waviness.png

    Can you post an image with the hair style you are working on? You may also play with the Demo, it has a lot of options:
     
  21. zhangxinghao

    zhangxinghao

    Joined:
    Apr 28, 2017
    Posts:
    16
    Last night it was too late in China, so I got to sleep.
    Your demo is interesting, I just tried it!
    This is the hair style I'm working on.

    图片1.png
    I'm trying to do an amazing deal with kinect and "hairwork".
     

    Attached Files:

    Last edited: Jun 9, 2017
    hopeful and neoshaman like this.
  22. Simod

    Simod

    Joined:
    Jan 29, 2014
    Posts:
    176
    Gorgeous hairs. And it's easy to create. Please refer to the image:
    Untitled.png
    1. Creation of a "Hair Part" is explained in Official Tutorial by nVidia
    2. "No Wave" is just a set of a straight "guide lines", those are very easy to create with "Hair & Fur" in 3dsMax
    3. "Wave" is also a set of "guide lines", but artistically distorted using "Styling Tools" of the "Hair & Fur". Please check the image.
    GUID-CCAFED33-810D-491B-9160-3790B093C963.png

    Once exported to APX file, you can start tweaking hair settings in the "Hair Viewer".
    https://developer.nvidia.com/gameworksdownload#?search=hair
     
    zhangxinghao likes this.
  23. zhangxinghao

    zhangxinghao

    Joined:
    Apr 28, 2017
    Posts:
    16
    Well, perhaps we had some misunderstanding on communication.
    We had already worked out the wave effect in 3dmax, but used some other plugin to import it into unity. So the hair displayed in unity was divided into obvious pieces, which didn't look well.
    I just tried to download the Nvidia Hairworks in your link, but failed due to connection problems. I searched for usage of it but did not understand it quite well.
    Because of time difference, I got to ask you immediately again if I may have your unity project or scripts that can be used to modify some attributes of hair made in 3dmax, like in the demo you sent. Maybe it's kind of impolite, but the deadline of my project is urgent, I beg your forgiveness.
    I admit that I haven't seen all of your videos, because it's not convenient in China to get on youtube.
     
  24. Simod

    Simod

    Joined:
    Jan 29, 2014
    Posts:
    176
    Hello zhangxinghao,

    My apology.
    I am afraid it's not legally possible to use HairWorks in production, until it gets a license from nVidia. What we are currently doing is a close tests, under specific EULA (in addition to EULA by nVidia) which clearly states: it's a private preview for internal tests.

    In case of urgency I would suggest to stay with the current plugin or find another option. Choosing HairWorks variant is risky at the moment, as long as there is no guarantee or known date of the nVidia's license and permission.

    PS. Our apology for this inconvenience, but nothing we can do at the moment. I guess you are using "Hair Tool" by Andrii, try to contact him. He likely got a solution for you, as long as this type of hairs is easy to create.
     
  25. zhangxinghao

    zhangxinghao

    Joined:
    Apr 28, 2017
    Posts:
    16
    Friend,
    No need to apologize,I think I can find other way to solve this,
    thank you again.:p
     
  26. Simod

    Simod

    Joined:
    Jan 29, 2014
    Posts:
    176
    Yw and good luck ;)

    @edan_kuva, I got a confirmation of a working prototype with Motion Vectors. It still needs polishing but the base idea did a trick - thank you for that. Also we want to add these options into the Tech Demo, to play with and to show how it looks with an Image Effects.

    Unity 2017-06-12 15-41-49-58.png Unity 2017-06-12 15-42-02-11.png Unity 2017-06-12 15-42-02-40.png Unity 2017-06-12 15-42-02-63.png
     
    Last edited: Jun 13, 2017
    nxrighthere and johnartune like this.
  27. r3ndesigner

    r3ndesigner

    Joined:
    Mar 21, 2013
    Posts:
    143
    Simod likes this.
  28. johnartune

    johnartune

    Joined:
    Oct 18, 2016
    Posts:
    61
  29. Simod

    Simod

    Joined:
    Jan 29, 2014
    Posts:
    176
    Hi r3ndesigner,

    Thank you for this, looks very promising. I will make use this included in the tools list in the docs as the alternative to Hair & Fur

    Hi johnartune,

    Yes, will do this today ;)
     
  30. Simod

    Simod

    Joined:
    Jan 29, 2014
    Posts:
    176
    Here,

     
    nxrighthere and johnartune like this.
  31. johnartune

    johnartune

    Joined:
    Oct 18, 2016
    Posts:
    61
    Hello Simod,
    That's perfect job.
     
  32. johnartune

    johnartune

    Joined:
    Oct 18, 2016
    Posts:
    61
    Hello Simod,
    That's right you get hair motion vector, Maybe a good way to get particle motion vector. And could you tell us the idea how we get motion vector from mesh is not solid with alpha blend opacity?
     
  33. Simod

    Simod

    Joined:
    Jan 29, 2014
    Posts:
    176
    I think it's same idea.

    You just need old and current vertex positions. Please check: "Internal-MotionVectors.shader" (built-in shaders), it is small and very explanatory of how it works in Unity.
    And I think it's likely does not matter if your mesh is alpha blended
     
    johnartune likes this.
  34. Simod

    Simod

    Joined:
    Jan 29, 2014
    Posts:
    176
    Ahem, actually on a second thought that might be incorrect. I think you need to ask more people on a forums.
     
  35. Straiiker

    Straiiker

    Joined:
    Nov 12, 2014
    Posts:
    2
    Is there any early access to the plugin? And when is the release planned?
     
  36. Simod

    Simod

    Joined:
    Jan 29, 2014
    Posts:
    176
    Hello Straiiker,

    The first release was planned at 1-st March, but due to delays with license from nVidia, there is no known date at the moment. Hence only early access is through close beta program, which we grant depending on test environment, and obviously not for production builds.
    If you are looking for a hair solution to be used in your project, Hair Composer is not a good option to stay with, as it has a potential risk to be never released.

    Meanwhile we keep it updated with a minor bug fixes and improvements, and once license is granted we will deploy a full-time development cycle.
     
  37. Straiiker

    Straiiker

    Joined:
    Nov 12, 2014
    Posts:
    2
    Can I participate in a closed beta? I'm doing a small project, just for myself not for selling. I wanted to try your plugin on the character and forest animals. I could do some tests and maybe even help improve it. If this really write to me on the mail (straiiker@gmail.com), or in Skype (oleg.ivanov1211).
     
  38. Simod

    Simod

    Joined:
    Jan 29, 2014
    Posts:
    176
    Thank you Straiiker. I think these common cases has nothing to test as those are related mostly to HairWorks. You may clearly see if hairs suits your models through Hair Viewer. And download this tool from: https://developer.nvidia.com/gameworksdownload#?search=hair

    Also nVidia got a GameWorks channel on YouTube with a bunch of tutorials related to HairWorks. These are pretty descriptive and good to start with.
     
    johnartune likes this.
  39. r3ndesigner

    r3ndesigner

    Joined:
    Mar 21, 2013
    Posts:
    143
    Do you think we can enter in contact with nvidia, make a petition or something that can speed up the license? If yes i ll like to help, this asset is amazing ^^.
     
    Simod and johnartune like this.
  40. johnartune

    johnartune

    Joined:
    Oct 18, 2016
    Posts:
    61
    Thank you Simod.
    I still trying to find Internal-Motion Vectors.
     
  41. Simod

    Simod

    Joined:
    Jan 29, 2014
    Posts:
    176
    Good idea.
    Actually today we did a brainstorm about GameWorks EULA. And seems like it was changed since and now states the license is acquired once "ACCEPT" button is clicked.
    We are going make one more request (previous one was ignored) for confirmation.

    Yes, for this you need to download "Built in shaders" from https://unity3d.com/get-unity/download/archive. Please try that link
     
    johnartune likes this.
  42. johnartune

    johnartune

    Joined:
    Oct 18, 2016
    Posts:
    61
    Thank you so much Simod.
    I really have so much work to do. Sorry for the feedback, I promise next character I'll test more animation as running and jumping with hair composer in our animation demo.
     
  43. johnartune

    johnartune

    Joined:
    Oct 18, 2016
    Posts:
    61
    Hello Simod.
    I'm so much interesting, What time we could get the hair composer from the asset store? Beggar for not much expensive.
     
  44. r3ndesigner

    r3ndesigner

    Joined:
    Mar 21, 2013
    Posts:
    143
    Looks like just ll be released when nvidia liberate the license, so when no one knows xD, about price think he said 30 to 50 €
     
  45. johnartune

    johnartune

    Joined:
    Oct 18, 2016
    Posts:
    61
    Thank you.
     
  46. Simod

    Simod

    Joined:
    Jan 29, 2014
    Posts:
    176
    No problem and thank you too ;)

    Yes, once it gets a license it will be published in the Asset Store for sure. The long timing is really disturbs us, hopefully it won't take forever.
     
  47. zhangxinghao

    zhangxinghao

    Joined:
    Apr 28, 2017
    Posts:
    16
    Hi,Alexander

    amazing work,After I used it, I couldn't help admiring it.

    It's a lot better than the Unity Japan update Nvidia I tried before.


    As an application developer, I don't know much about deep things (such as rendering), but what I value more is its functionality.


    So I want to ask, is there a way to change the overall size of the Hair under the running state (or can dynamically change according to the model size can also be), I know it may be difficult, because I'm "NVIDIA Hair Works Integration" in also tried to fail, that may be HairWorks problem, but I still speak out, maybe you have a better way?


    In addition, I have just had a pleasant weekend, and I will pay attention to the following work. What questions will I give you in the first place
     
  48. Simod

    Simod

    Joined:
    Jan 29, 2014
    Posts:
    176
    Hello zhangxinghao,

    Thank you for your feedback and question. Did you ask about the scaling?
    Unity 2017-06-26 08-43-52-78.png

    Scaling is not working correctly. Please let me know how is this essential to the project you are testing in.
     
  49. zhangxinghao

    zhangxinghao

    Joined:
    Apr 28, 2017
    Posts:
    16
    Hi Alexander
    Yes, that's what I mean.Our engineering principle is through the Kinect, and then the hair perfect set on his head, but each person's face scale not same we can use the code to obtain the size of a human face parameters, if the hair can follow the model Scale changes, it will be very important.Before we can change the size of the hair, we can only make the appearance of the hair magnification by controlling hair and camera, but this can cause a lot of problems in rotation.
     
  50. Simod

    Simod

    Joined:
    Jan 29, 2014
    Posts:
    176
    Hello zhangxinghao,

    Oh I see now. That depends on how AR is working and which face parameters it has. Honestly I never worked with Kinect, but from a HairWorks point of view it would be great to motion capture user's movements for hairs simulation. That will help with the rotation problems.

    Speaking of scaling I got two thoughts in mind. Both needs changes in the HairWorks source:
    • Probably best way is to know user's head shape and position. I don't know if Kinect can do such thing, but HairWorks needs a grow mesh details to fit hairs nicely to the head. With changes to HairWorks it would be possible to use morphs, which will accurately be applied to the grow mesh. No scaling is necessary in this case.
      We got several requests for morphs support (Morph3d, UMA), but Source EULA requires paid license, hence any further development in that direction has postponed.

    • Any other ways, like scaling, should consider be a workaround. For example changing camera matrices (or position, rotation and projection details) is tricky, but could help conforming the hairs to the user's face.

      On another hand, hairs scaling is buggy, hence it needs changes in the HairWorks source as well.
     
    zhangxinghao likes this.