Search Unity

Assets [RELEASED] Hair Composer (nVidia HairWorks)

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

  1. Simod

    Simod

    Joined:
    Jan 29, 2014
    Posts:
    161
    1. Deep integration. HC will support one and every option available in Unity and HairWorks.
    2. Performance
    3. Rock stable code with Unit Tests
    4. User friendly. Zero code. A simple setup
    FEATURES
    • DirectX 11
    • Directional, Spot and Point lights support. You may use up to 8 lights simultaneously.
    • Full shadows support for Spot and Point lights
    • Hair simulation + Frame rate Independent Rendering (FIR)
    • Gamma and Linear spaces
    • Layer Masks
    • Camera and Light culling
    • Light probes and ambient lighting
    • Forward rendering path
    • Image Effects support
    • Windows platforms (x86 and x64)
    • Quick start Documentation
    FEATURES BY NVIDIA
    IN DEVELOPMENT
    • HDRP and Shaders
    • Morphs
    AFTER RELEASE TODO LIST
    • Deferred rendering path
    • Directional light shadows
    • One pass shadows render for Point lights (available in prototype mode)
    • Light cookies
    • Light Probe Proxies
    • Reflection Probes
    • HDR
    • HairWorks cache optimization, for even more performance
    • "How To" video tutorials
    • VR
    • DirectX 12
    FAQ
    Q. Can I groom hairs in the editor?
    A. Unfortunately not at the moment. HairWorks API does not support this option and all grooming should be finished BEFORE importing into Unity 3D. There is though workaround we may implement later.

    Q. What about collision? Does it use whole underlying mesh or do we have to add simple colliders like spheres?
    A. HairWorks is using collision spheres, but ignores Unity 3D colliders. Like with grooming, colliders should be present in the asset file before importing into the Unity engine.

    Q. How does the hairs hold up on an object that is moving? Is it pre-animated?
    A. It's a true simulation. Technically plugin sends skinning matrices to HairWorks API for further processing. You may find more details at: https://docs.nvidia.com/gameworks/c...sdkGettingStarted.html#updating-skinning-data

    Q. If I use Character Assets like Morph3d which comes with own Hairs, is it possible to just replace their hair with yours? Will Hair Composer work with every Character System out there? UMA / Morph3d etc?
    A. The character systems like Morph3d and UMA are not supported. But since Hairworks 1.4 we included this option into our TODO list

    Q. Can I create eyebrows too?
    A. Yes you can. But for better performance we would suggest using old school techniques for short-haired models.

    Q. Is this DX11/12 and nVidia GPU only?
    A. It should run on any GPU which supports DX11.

    Q. Will it run on XBOX ONE or PS4?
    A. NVIDIA's Binary EULA does not allow systems other than Windows. Hence XBOX ONE and PS4 are not in priority list. We are very sorry for that - nothing we can do in this case.

    Q. Are there any plans for other GameWorks features to be transformed into plugins for Unity?
    A. There is no plans to implement extra GameWorks features.

    Q. Please could you improve the accuracy of hair self-shadows or support self-shadow blur?
    A. This is a very complex request. In order to make it more accurate we have to create a technique similar to Deep Shadows" https://prezi.com/gzzsj82iobjv/deep-shadows/

    Q. Can I order you guys to make a custom work for me?
    A. Yes, it’s possible, we provide custom work only for our products. Drop us private message with details.

    DEMOS

    TECH DEMO
    PERFORMANCE DEMO
    In order to start demo on Windows 7, please make sure you have:
    • Latest Graphical drivers installed
    • DirectX installed and working
    • Window 7 Service Pack 1 (KB976932)
    • Update for Windows 7 (KB3163589)
    • Platform Update for Windows 7 (KB2670838), so it will enable DirectX 11.1 features in your system

    MEDIA







     
    Last edited: Apr 26, 2019
  2. Knightmore

    Knightmore

    Joined:
    May 11, 2012
    Posts:
    226
    Just wow...
    How is your release plan? Begin with a discounted beta or will you show your progress until it is ready for a full release?
     
  3. Simod

    Simod

    Joined:
    Jan 29, 2014
    Posts:
    161
    Thank you Pathelion :)

    According to our schedule we should get RC version in aprox. one month, means all in development features and requirements will be done and ready for production in third-party projects. In two weeks a Beta Version demo will be available for download and tests on Windows machines with DirectX 11 support.

    Not sure yet of the discounted beta and pricing. More videos and updates with a progress are expected for sure

    Just in case please let us know what would you like to see in the final product. Which options or may be support of some features we did not listed yet?

    Thanks in advance ;)
     
    Knightmore likes this.
  4. Knightmore

    Knightmore

    Joined:
    May 11, 2012
    Posts:
    226
    Well those two things I need are already on your todo list:
    • Deferred rendering path
    • Directional light shadows

    But as I am using hair solutions mostly for humans and their heads, a video how it will look with this would be awesome. Maybe some shoulder long hair.

    As I only saw the density together with a density texture: Will it be possible to style the fur and hair further? You activated the control points, but can you also form the splines?

    What about collision? Does it use the whole underlying mesh or do we have to add simple colliders like spheres?
     
    Simod likes this.
  5. Simod

    Simod

    Joined:
    Jan 29, 2014
    Posts:
    161
    The shoulder long hairs are supported. Even more - hairs can be pinned somewhere in a middle to give a life like look. Will make a video of this later.

    You mean to groom hairs in the editor, don't you? Unfortunately not at the moment. nVidia HairWorks API does not support this. All grooming should be done BEFORE importing the asset file into the Unity 3D.

    There are a collision spheres, but as long as nVidia HairWorks API does not give anything to manipulate them it will ignore Unity 3D colliders. For the same reason there is no way to edit hair colliders in the Editor. Like with grooming, colliders should be present in the asset file before importing into the Unity engine.
     
    Knightmore likes this.
  6. Simod

    Simod

    Joined:
    Jan 29, 2014
    Posts:
    161
    A full list of instance options (material). These are the same like in the FurViewer.exe editor by nVidia. Once you done editing your hair asset through FurViewer, you may continue working directly from Unity.

    There are though some options which won't be available at the first release. For example "Pins" will work as is, but are not editable yet.


    HcInstance.png
     
    Crossway likes this.
  7. thelebaron

    thelebaron

    Joined:
    Jun 2, 2013
    Posts:
    372
    Wow looking forward to this. I tried getting the open source project working but couldnt, not sure if it was the version of unity or what but a lack of instructions and vague information on the setup in the forums didnt help, so it'd be nice to have something current and supported. Any idea what the expected price of this going to be?
     
  8. Simod

    Simod

    Joined:
    Jan 29, 2014
    Posts:
    161
    Thank you thelebaron
    There is no pricing available yet, as we are currently in a middle of licensing HairWorks with nVidia. Once we get it sorted, rest is straight forward and I will put these details with updates ;)
     
  9. Simod

    Simod

    Joined:
    Jan 29, 2014
    Posts:
    161
    Hello everyone.

    Some updates:
    • Improvement in camera culling
    • Lighting is more accurate in linear space. Now specular color should show correct lighting
    • Improvement in Light Probes support. Hair instance will follow same options as native Renderer, and the light probes contribution can be disabled directly from the instance material options.
    • Hair instance material got extra API to make changes on a fly
    • Several optimizations in a pixel shader.
    • "Per Strand Texture" support. Surprisingly we missed that option before.
    • LOD will be enabled by default now
    And a video we promised to make, which covers human hairs ;) Enjoy

     
    Last edited: Feb 7, 2017
    Flurgle likes this.
  10. Flurgle

    Flurgle

    Joined:
    May 16, 2016
    Posts:
    371
    Looks gorgeous!
     
  11. kenamis

    kenamis

    Joined:
    Feb 5, 2015
    Posts:
    340
    looking good. How does the hair physics hold up on an object that is moving, it's transform changing not just it's animation?
     
  12. Simod

    Simod

    Joined:
    Jan 29, 2014
    Posts:
    161
    Flurgle likes this.
  13. Matt-Roper

    Matt-Roper

    <Of The Graphics> Unity Technologies

    Joined:
    Oct 27, 2015
    Posts:
    106
    Looks good, I look forward to giving it a try :D
     
    Malbers, Simod and Flurgle like this.
  14. Simod

    Simod

    Joined:
    Jan 29, 2014
    Posts:
    161
    More updates:
    • Editor UI got four new visualization options
    • Light culling improvement
    • Skinning matrices logic has been moved to the C++ native code, now it won't use too much CPU resources
    • Some crazy tests with 4096 light sources setup in a scene :confused:
    • Application won't crash anymore then disabling lights with opened Profiler
    • Use of SSE with DirectXMath
    Known issues:
    • Overburdened scene with thousands pixel lights, may crash the application. With latest updates it a lot more stable, but may occasionally happen again
    • Enabling instances may cause non-responsive state. Seems like GPU drivers crash. Please let me know if you experience the same problem in the demo, while switching character lists
    Demo!!! :p
    Please guys your feedback is important to us !!!
     
    Last edited: Feb 16, 2017
    Crossway likes this.
  15. Flurgle

    Flurgle

    Joined:
    May 16, 2016
    Posts:
    371
    @Simod i just tried it, and got this error - tested on a 660 TI.

    Everything worked fine, except there was no hair
     

    Attached Files:

  16. thelebaron

    thelebaron

    Joined:
    Jun 2, 2013
    Posts:
    372
    Love it, demo ran perfectly here, 1070(tested on both versions). I noticed the guy with the braided beard's hair doesnt stick in the braid/tie thingys but aside from that everything else looked normal
     
  17. Simod

    Simod

    Joined:
    Jan 29, 2014
    Posts:
    161
    Thank you Flurgle,

    Issue confirmed on a fresh installed Windows. Something is missing (not the Hair Works DLLs). Stay tuned, will be fixed soon.

    Thank you thelebaron! Yes, those are the hair pins. Take a look on Lisa, she also got moving pin point, which is incorrect. Pins are not supported currently and will be implemented after release.

    Meanwhile please could you give some FPS average measurements.
    On my workbench with 780 GTX it can be as slow as 30 FPS on 3440x1440 with all options enabled. I made People and Creatures in groups intentionally, so it would be easier to see worst performance cases.
     
    Last edited: Feb 16, 2017
    Flurgle likes this.
  18. Simod

    Simod

    Joined:
    Jan 29, 2014
    Posts:
    161
    Last edited: Feb 16, 2017
    jdraper3 and Flurgle like this.
  19. thelebaron

    thelebaron

    Joined:
    Jun 2, 2013
    Posts:
    372
    about 120-130fps here tested at both 1920x1080 as well as 2560x1440(same fps for both of my monitors strangely enough, the higher res was in a window though).
    default camera position and angle
    highest settings
    gtx 1070
    dual x5650
     
  20. Flurgle

    Flurgle

    Joined:
    May 16, 2016
    Posts:
    371
    @Simod, downloading now! BTW, the download links above are swapped.
     
  21. Flurgle

    Flurgle

    Joined:
    May 16, 2016
    Posts:
    371
    @Simod, the 64 version loaded, looks good, but no hair

    the x86 version crashed, but I use 64 so doesn't matter to me that much.
     

    Attached Files:

  22. Simod

    Simod

    Joined:
    Jan 29, 2014
    Posts:
    161
    Thanks a lot. I swapped the links back to normal, funny as I checked them three times before publishing :facepalm

    Quick question: by any chance you got special symbols in the root path to the executable?
     
    Last edited: Feb 17, 2017
    Flurgle likes this.
  23. Simod

    Simod

    Joined:
    Jan 29, 2014
    Posts:
    161
    Cool thanks. To compare: default camera angle, at 1920x1080 on GTX 780, windowed mode gives minimum 40 FPS with Creatures. To my calculation this scene creates:
    • 5 shading passes, one per instance (1 Manjaladon, 2 Mite, 2 Catepillar)
    • 1 shadow pass for Manjaladon from Spot light
    • Up to 6 shadow passes for every instance from Point light
    We are thinking of one pass rendering here for point lights. Hopefully that will improve performance a little.
     
    Flurgle likes this.
  24. Simod

    Simod

    Joined:
    Jan 29, 2014
    Posts:
    161
    @Flurgle, just to confirm we got issue reproduced with special characters in the path. Win32 crashed, Win64 no hairs, like you said. Thank you, that is important and will be fixed.
     
    Flurgle likes this.
  25. Flurgle

    Flurgle

    Joined:
    May 16, 2016
    Posts:
    371
    @Simod I can confirm 100% it is not any weird symbols in the path.
     
  26. Simod

    Simod

    Joined:
    Jan 29, 2014
    Posts:
    161
    Hmm, okay. We reproduced this issue with cyrillic characters in the path. For example:
    Hopefully fixing this will make it working on your machine.
     
  27. jdraper3

    jdraper3

    Joined:
    May 28, 2015
    Posts:
    117
    Tried the demo - looks and performs great! I've been using another hair system which looks good but has some major issues. This will be an insta-buy for me - can't wait :)
     
    Flurgle likes this.
  28. Simod

    Simod

    Joined:
    Jan 29, 2014
    Posts:
    161
    @jdraper3, Thank you JD. Should you get special requirements please let me know. It also has caveats, and needs a lot of feedback in order to fix all of them.;) Btw if you got a few minutes please could you write your performance results down here. It would be great to know your PC setup and the most lowest FPS with all options maxed.
    Thanks a lot!

    @Flurgle, we just finished fixing the "special characters" issue. If you let me know how it works, that would be great. Fingers crossed

    Updates:
    • A second "DLL not found" issue was related with WinAPI which did not take into account wide characters in a paths. Credits to @Flurgle for pointing to that problem
    • Threads synchronization methods were rewritten, in order to address occasional crashes of the plugin. The 4096 light sources scene seems more stable now.
    Demo:
     
  29. Flurgle

    Flurgle

    Joined:
    May 16, 2016
    Posts:
    371
    @Simod, same thing still. Same error as the picture I posted previously - it couldn't find the HairWorks dll. The dll is definitely in the plugins folder too. It's located at the root of the drive too, so no special character issues here.
     
  30. Simod

    Simod

    Joined:
    Jan 29, 2014
    Posts:
    161
    Thank you @Flurgle, that's weird. The loading code is very simple, but seems like we are missing something very tiny and invisible. Sad we can't debug this on your setup.

    In case if you have time for this, I made a special build with a slight changes, just at the loading part. Plus it will show two messages, one with "HairWorksPlugin.dll" path, and another with "NvHairWorksDx11.win64.dll" path.
    If you let me know these debug snippets, that may help us to understand what is going on there.

    https://mega.nz/#!cxV2kIBK!WqrVzQgnCDDlk58NBJswkHDTLoA1VdoN1szzpj7s9lI

    Thank you in advance.
     
  31. Simod

    Simod

    Joined:
    Jan 29, 2014
    Posts:
    161
    Updates:
    • A third (!!!) "DLL not found" issue was related to missing d3dcompiler_47.dll and affected only in Windows 7 systems. Credits to @Flurgle for his help and patience ;)
    • "Magenta screen" issue in Windows 7 can be addressed with installed Platform Update for Windows 7 (KB2670838). That will be mentioned in a documentation
    • Material visualization got extra options, and was restructured for convenience
    • Now updates to textures will affect hairs immediately
    • Specular texture support (yes - one more missed option)
    • MSAA per hair instance

    Updated demo:
     
    Last edited: Feb 25, 2017
    Flurgle likes this.
  32. RonnyDance

    RonnyDance

    Joined:
    Aug 17, 2015
    Posts:
    557
    The demo is stunning.
    Really good work. Looking forward to deffered rendering option.
    I am asking me two things:

    - If I use Character Assets like Morph3d which come with own Hairs, is it possible to just replace their hair with your system? Will your hair system work with every Character System out there? UMA / Morph3d etc?
    - I saw a GUI and Inspector options in the second video, where you can change the Hair Style like form, color stuff etc. Does this mean that I have dozens / lot of hair styles that I can change IG with your system? I am working on a MMO so changing hair and having lot of hair options is pretty important.

    Thanks a lot
    Ronny
     
  33. Simod

    Simod

    Joined:
    Jan 29, 2014
    Posts:
    161
    Hello Ronny,

    Thank you for your feedback. Deffered rendering path will definitely be implemented. Our ETA is one/two months after release, as we need to polish the present features.

    - The character systems like Morph3d and UMA are not supported. But we are looking into this opportunity. Technically nVidia HairWorks listens "growmesh". If we find a right way to morph growmesh with Morph3d, we will publish working solution in no time.

    And yes and no. While instance material has a lot of options, there are still limits. To be clear, there is no way to get a !!completely!! different hairs. I mean you can't take a scary beast coat, and attach this to a human head, with just a few tweaks.
    All these examples you saw in the video, are completely different hairs. But these are following same set of options, which you may customize during the game play.

    A good example is Skyrim. You may select a hair, and tweak it's color.
    With Hair Composer you select a hair, change it's colors, and get the rest options you saw on top of that.

    Another example is Morph3d. It gives opportunity to "morph" a humanoid body by "a little". But it won't make it to "quadruped, winged dragon" ;)


    Thank you again. Will see what we can do with character systems support in a future. That would be a great addition indeed!
     
    RonnyDance likes this.
  34. RonnyDance

    RonnyDance

    Joined:
    Aug 17, 2015
    Posts:
    557
    You are totally right. I meant something like WoW / Skyrim etc where the player gets let say 20 Hair options where he can change color / perhaps some small stuff like fullness etc. So this would be amazing already. Of course there are Games like Black Desert where you can change length and more hair stuff directly in game without having XX hair options to choose from making every hair pretty unique. But that's not something important if you ask me just a "cool feature".

    Yeah this would be really cool. As you might know lot of people are using Character Assets in their games already which come with pretty poor Hair options and features. So being able to replace it with your system would be really awesome. But well focus first on the main system. I am really looking forward what you are creating here.

    Cheers
    Ronny
     
  35. Simod

    Simod

    Joined:
    Jan 29, 2014
    Posts:
    161
    A new Technical demo:


    ATTENTION: Last three days gave a huge regression in stability. Please take our apologies should you experience crashes and hangs in the demos. We aware of these problems and will address them for sure
     
    Last edited: Mar 14, 2017
    Crossway and jdraper3 like this.
  36. Crossway

    Crossway

    Joined:
    May 24, 2016
    Posts:
    394
    Hi, looks really nice thank you a lot. Can you please release the first demo version on the asset store?
    As I think first demo will be cheaper I want to buy faster :D

    Also can we create eyebrows too?

    Edit: it's a Forward only shader? that not good man :( Forward shaders doesn't work with SEGI.
     
    Last edited: Mar 5, 2017
  37. Simod

    Simod

    Joined:
    Jan 29, 2014
    Posts:
    161
    Hi Crossway,

    Ah yes - SEGI, another tasty asset :) To make complex projects working together is a big task. Like with SEGI, Hair Composer is at beta and main goal is to keep it stable and working well with naked Unity Engine. After release we will add Deffered path, but it's compatibility with third-party assets is not guaranteed. Good news we are scheduling integration with a few assets, and SEGI is in our list

    You CAN do eyebrows, yes :) Please check Hair Composer (Tech Demo) video.

    Both demos will be included in the final release, plus extra Tutorials.
     
    Crossway likes this.
  38. Crossway

    Crossway

    Joined:
    May 24, 2016
    Posts:
    394
    I tested demo version I mean does it work with blend shapes facial animation?
     
  39. Simod

    Simod

    Joined:
    Jan 29, 2014
    Posts:
    161
    Not at the moment. It will work with facial boned animation just fine, yet morphs are not supported by HairWorks, hence require more work on HairWorks API (also subject to nVidia HairWorks EULA license).

    BTW what asset do you use for facial animation? We got Morph3d support in our list, which is also seems working with "morphs" :) So hopefully it's support will help with your asset in a future release.
     
    Crossway likes this.
  40. Crossway

    Crossway

    Joined:
    May 24, 2016
    Posts:
    394
    Thanks, I think that really important cause also beard needs to move along morphs.
     
  41. Simod

    Simod

    Joined:
    Jan 29, 2014
    Posts:
    161
    Developing stage changed to late Beta.

    Particularly ready for public tests, yet currently waiting for nVidia's license approval or deny - for some reason we are experiencing a long response delay from them.

    Thank you to everyone who contributed in private Beta. Tons of issues were found and good thing, most of these were fixed.

    Updated demos from the latest build
    Tech demo. Download and play with material settings yourself
    Performance demo. Select from three sets of characters and watch your FPS
     
    Crossway likes this.
  42. Simod

    Simod

    Joined:
    Jan 29, 2014
    Posts:
    161
    Update: Good news. Today We had a voice chat with Unity representatives about Directional Light shadows in native plugins. If all goes well, we will get a very robust and effective implementation in Hair Composer.

    Still there is a few performance issues as long as Directional Light shadows require up to five!!! (four cascades, plus initial depth buffer) passes. Plus extra shading pass from a camera. Of course it will be less (thanks to optimizations) in most cases, but has to be used with care.

    Good to note though, shadowing in Deferred rendering path require up to four passes, as long as depth buffer is ready at the lighting stage. And as a total optimization we are thinking to "merge" Forward and Deferred rendering ideas. Hence Hair Composer may get it's own rendering path at expense of memory usage, because the goal is to minimize time consuming passes as much as we can.

    Merged rendering paths is also necessary for Image Effects. To our knowledge Unity's effect may cause extra pass (if so requested) in Forward path, which is also makes us move in that direction.

    These ideas will be brainstormed later after release, as we currently should concentrate on the basics, and understand most of the internals of the Unity's rendering pipeline.

    So stay tuned, all candies up ahead ;)
     
    Crossway likes this.
  43. Crossway

    Crossway

    Joined:
    May 24, 2016
    Posts:
    394
    Thanks, is there any special discount for people who buy this at first three days of release? :D
     
    Flurgle likes this.
  44. thelebaron

    thelebaron

    Joined:
    Jun 2, 2013
    Posts:
    372
    Curious to know what getting its own rendering path means? Also hopefully nvidia get back to you with an approval soon.
     
  45. Simod

    Simod

    Joined:
    Jan 29, 2014
    Posts:
    161
    Thank you thelebaron, yes working hard to make it all true
    There is nothing special about the mentioned custom rendering path. The idea is as with Deferred Cascaded Shadow Maps or Deferred Rendering path, t.e draw once and use it many times. It is a side optimization like with Forward+, which is still Forward and nothing also.

    Crossway Yes, likely. Sadly, we still don't have exact pricing yet - the license approval is much bigger obstacle for us at the moment
     
    Crossway likes this.
  46. Simod

    Simod

    Joined:
    Jan 29, 2014
    Posts:
    161
    To Pathelion's question of a shoulder long hairs.
    But how about a hairs longer than that? Here it is:




    Also could not resist and finally try 3dsMax and HairWorks workflow with a custom model by MalberS Animations.
    To the record: they are working on something BIG. That gotta get furry touch for sure:rolleyes:

     
    Slaghton, evamariah and Malbers like this.
  47. johnartune

    johnartune

    Joined:
    Oct 18, 2016
    Posts:
    61
    So great hair show in unity. But when would you send the code to assetstore. I'm so much waiting for the plugin. good luck.
     
  48. Simod

    Simod

    Joined:
    Jan 29, 2014
    Posts:
    161
    Thank you johnartune,

    The plugin awaits for approval by nVidia licensing team. Seems like they got a long queue or something. Once it's done it will appear in asset store. According to preliminary information subsequent licensing will NOT be necessary, hence once purchased you may use in your project without contacting them.

    PS. Meanwhile we testing it through and through, and partially developing Deffered Shading path, as it important to implement BEFORE Directional Lights shadows... I know sounds a bit odd, but those two are interconnected :oops:
     
    tinyant and Bartolomeus755 like this.
  49. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    26,187
    Going to hazard a guess that this is DX11 / 12 only and nVidia GPU only?
     
  50. sybere

    sybere

    Joined:
    Mar 26, 2015
    Posts:
    176
    Any info about the price? Maybe work on xbox one?
     
unityunity