Search Unity

Hair Tool

Discussion in 'Assets and Asset Store' started by andrii-shpak, Dec 15, 2016.

Thread Status:
Not open for further replies.
  1. Zed001

    Zed001

    Joined:
    Sep 13, 2012
    Posts:
    6
    Has anyone else tried to use Hair Tool with Final IK?
    Seems that Hair Tool doesn't respect IK...
     
    Artaani likes this.
  2. andrii-shpak

    andrii-shpak

    Joined:
    Nov 27, 2014
    Posts:
    315
    You can use Hair Tool with IK.
    IK overrides animation on late update. Hair Tool works on late update too. So, you need to add hair settings script to script execution order.
     
    Artaani and hopeful like this.
  3. andrii-shpak

    andrii-shpak

    Joined:
    Nov 27, 2014
    Posts:
    315
    Is you mesh consist of submeshes?
     
  4. cerrec

    cerrec

    Joined:
    Jan 19, 2017
    Posts:
    41
    I don't think so. It's a simple skullcap that I extracted from a Daz Genesis model, in 3DSMax.
     
    Last edited: Jul 10, 2017
  5. stylophone

    stylophone

    Joined:
    Aug 16, 2012
    Posts:
    37
    Hi, just want to let you know that your website is unreachable as it automatically redirected to wix, as well as the documentations.
     
  6. Artaani

    Artaani

    Joined:
    Aug 5, 2012
    Posts:
    423
    andrii-shpak, hello. Just checked Hair tool after a pause.
    Huge progress! Now it casts shadows, lit by point lights and affected by wind zone. Very nice!
    Almost usable for projects.

    Still a few things which should be fixed:

    Hair does not receive shadows from point light
    2 mb GIF
    Hair does not recieve shadows Point light.gif

    And its receive shadows from dir light, but only partially. Look:
    2 mb GIF
    Hair does not recieve shadows Dir light.gif
    It is a bit in shadow, but still lit by dir light. Also note that hair casts shadow from dir light not as good as from point light (look at right side of the face) but it is not a critical flaw.

    I hope it is possible to fix it?
    Once problem with light and shadow will be solved, this tool will be absolutely amazing!
     
    Last edited: Jul 10, 2017
    hopeful and Romenics like this.
  7. Zed001

    Zed001

    Joined:
    Sep 13, 2012
    Posts:
    6
    Oh, heheh, thanks~ Works with it great now!

    One more thing: Is light probe support on the roadmap already?
     
  8. Vagrant-VX

    Vagrant-VX

    Joined:
    Sep 3, 2016
    Posts:
    8
    I had this problem too but I was trying to export from blender

    Solution is you need to remove all of the bones and textures from the scalp so that in the end you'll have only the scalp as a model with no other stuff in it, then it will work
     
  9. Liens

    Liens

    Joined:
    Feb 2, 2012
    Posts:
    49
    Where are the latest docs? Documentation link is dead!
     
  10. Steken

    Steken

    Joined:
    Sep 2, 2013
    Posts:
    3
    I'm having a problem that occurs in both Unity 5.6 and Unity 2017.1. The version of Hair Tool is 1.2.5.

    The call KernelId = Shader.FindKernel(kernelName); on row 23 of KernelBase.cs fails consistently, causing the hair to not render at all.

    This happens in all my projects where Hair Tool is used, and it has previously worked fine.

    If I start Unity from scratch, add Hair Tool as the only plugin, and run the scene "Demo", everything works as it should. This suggests that something else in the project is the root of the problem, but I have performed different tests and comparisons for days now, and not found a solution.

    I have tried deleting all Hair Tool files and reimporting them again, but the problem is still there.
     
  11. Steken

    Steken

    Joined:
    Sep 2, 2013
    Posts:
    3
    I'm replying to myself here: Right after posting the above question, I changed the order of the PlayerSettings "Graphics APIs for Windows", and put Direct3D11 before Direct3D9. When I tried the "Demo" scene again everything worked.
     
  12. andrii-shpak

    andrii-shpak

    Joined:
    Nov 27, 2014
    Posts:
    315
    Could you send me it on my support mail?
     
  13. andrii-shpak

    andrii-shpak

    Joined:
    Nov 27, 2014
    Posts:
    315
    Thanks, fixed
     
  14. andrii-shpak

    andrii-shpak

    Joined:
    Nov 27, 2014
    Posts:
    315
    [Hair does not receive shadows from point light] It is present in my road map.
    [And its receive shadows from dir light, but only partially] It because you use some post effects with using of normal depth texture. Looks like SSAO. Here is tutorial how to enable normal depth texture for hairtool
     
    Artaani and hopeful like this.
  15. andrii-shpak

    andrii-shpak

    Joined:
    Nov 27, 2014
    Posts:
    315
    I was not. But now yes,
     
  16. andrii-shpak

    andrii-shpak

    Joined:
    Nov 27, 2014
    Posts:
    315
    Fixed. Also there is pdf documentation in GPUToos/Hair/Documentation
     
  17. andrii-shpak

    andrii-shpak

    Joined:
    Nov 27, 2014
    Posts:
    315
    Yes it require DX11. Sorry for late answer.
     
  18. stylophone

    stylophone

    Joined:
    Aug 16, 2012
    Posts:
    37
    Mate there's no pdf documentation in GPUToos/Hair/Documentation...If you think there is you must be missing something...
     
  19. kinodax

    kinodax

    Joined:
    Dec 3, 2014
    Posts:
    22
    Same on the missing PDF documentation. However Thank You for whatever for the last fix. I had a problem where the hair was not tracking the head, yet reacted to all colliders. Having tried and traced everything I was about to start a support process when I saw the update, so I gave it a try and everything works better than before. So ++Goodness! Thanks!
    Any word on the compatibility of the cloth system with the hair system ? It has been a while since I last checked.
     
  20. andrii-shpak

    andrii-shpak

    Joined:
    Nov 27, 2014
    Posts:
    315
    hopeful likes this.
  21. andrii-shpak

    andrii-shpak

    Joined:
    Nov 27, 2014
    Posts:
    315
    I'm trying to have compatible verssions on store. But it is not always possible. So the better way is to write me. And I will send you both as one package
     
  22. pan-master

    pan-master

    Joined:
    Nov 11, 2013
    Posts:
    127
    During making the build
    Assets/GPUTools/Hair/Scripts/Geometry/MayaImport/MayaHairGeometryImporter.cs(9,7): error CS0246: The type or namespace name `NUnit' could not be found. Are you missing an assembly reference?
     
  23. NaughtySquirrel

    NaughtySquirrel

    Joined:
    Mar 31, 2017
    Posts:
    8
    Anyone had any success getting this to work with the Morph 3d models. I've been doing some tests but cannot seem to get the hair to render in play mode. I get an error about having no indices.

    Do I have to create a scalp model and somehow get that to fit the head size.... why can't I just use the skinnedmeshrenderer of the M3d model?

    I thought about using a model created with the M3d artists tools for the scalp.... I'm going to try that next.

    Also.... your brush needs a create hair option.
     
  24. NaughtySquirrel

    NaughtySquirrel

    Joined:
    Mar 31, 2017
    Posts:
    8
    Second question... I want the user to be able to change their hair style at runtime. How should I approach this?
     
  25. andrii-shpak

    andrii-shpak

    Joined:
    Nov 27, 2014
    Posts:
    315
    You can change hair setting in runtime. But you should "copy component" and then "paste component values" to save changes.
    To change hair geometry in runtime is impossible in current verssion.
     
  26. andrii-shpak

    andrii-shpak

    Joined:
    Nov 27, 2014
    Posts:
    315
    Could you send my morph model? I'd try fix it.
    [Also.... your brush needs a create hair option.] It is pressent in my feature list. And will be added soon
     
  27. andrii-shpak

    andrii-shpak

    Joined:
    Nov 27, 2014
    Posts:
    315
    I just added wrong import for Assertions. You can ease fix it by added
    "using UnityEngine.Assertions" insted of NUnit using. Or write me to my mail and I'll send you it directly
     
  28. NaughtySquirrel

    NaughtySquirrel

    Joined:
    Mar 31, 2017
    Posts:
    8
  29. sam-perisentient

    sam-perisentient

    Joined:
    Aug 11, 2013
    Posts:
    31
    I'm hitting a bug using HairTool in Unity 2017.1.0f3. When I open the demo scene, select the Scalp of any of the Styles, then click "Enable Brush", then press 'm' I get the following error in the console (and the brush doesn't work):

    ArgumentException: Attempting to create a zero length compute buffer
    Parameter name: count
    UnityEngine.ComputeBuffer..ctor (Int32 count, Int32 stride, ComputeBufferType type, Int32 stackDepth) (at C:/buildslave/unity/build/artifacts/generated/common/runtime/ComputeShaderBindings.gen.cs:223)
    UnityEngine.ComputeBuffer..ctor (Int32 count, Int32 stride) (at C:/buildslave/unity/build/artifacts/generated/common/runtime/ComputeShaderBindings.gen.cs:209)
    GPUTools.Common.Scripts.PL.Tools.GpuBuffer`1[System.Single]..ctor (System.Single[] data, Int32 stride) (at Assets/GPUTools/Common/Scripts/PL/Tools/GpuBuffer.cs:27)
    GPUTools.Hair.Scripts.Geometry.Create.Kernels.HairEditorKernel..ctor (UnityEngine.Vector3[] vertices, UnityEngine.Color[] colors, System.Single[] distances, GPUTools.Hair.Scripts.Geometry.Create.HairGeometryCreator creator, System.String kernelName) (at Assets/GPUTools/Hair/Scripts/Geometry/Create/Kernels/HairEditorKernel.cs:44)
    Assets.GPUTools.Hair.Editor.Geometry.Create.Scene.GPBaseBrush.StartDrawScene () (at Assets/GPUTools/Hair/Editor/Geometry/Create/Scene/GPBaseBrush.cs:30)
    Assets.GPUTools.Hair.Editor.Geometry.Create.Scene.GPMoveBrush.StartDrawScene () (at Assets/GPUTools/Hair/Editor/Geometry/Create/Scene/GPMoveBrush.cs:15)
    Assets.GPUTools.Hair.Editor.Geometry.Create.HairGeometryCreatorEditor.OnSceneGUI () (at Assets/GPUTools/Hair/Editor/Geometry/Create/HairGeometryCreatorEditor.cs:57)
    System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
    Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232)
    System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
    UnityEditor.SceneView.CallOnSceneGUI () (at C:/buildslave/unity/build/Editor/Mono/SceneView/SceneView.cs:2392)
    UnityEditor.SceneView.HandleSelectionAndOnSceneGUI () (at C:/buildslave/unity/build/Editor/Mono/SceneView/SceneView.cs:1721)
    UnityEditor.SceneView.OnGUI () (at C:/buildslave/unity/build/Editor/Mono/SceneView/SceneView.cs:1553)
    System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
    Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232)
    System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
    UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:272)
    UnityEditor.HostView.Invoke (System.String methodName) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:265)
    UnityEditor.HostView.InvokeOnGUI (Rect onGUIPosition) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:232)​
     
  30. leechanghun

    leechanghun

    Joined:
    Jul 21, 2017
    Posts:
    4
    Hi~
    (unity ver 5.6.1f HairTool ver1.2.6)

    i don`t know... error!!

    Error messege upload.
    Tell me how.
     

    Attached Files:

  31. andrii-shpak

    andrii-shpak

    Joined:
    Nov 27, 2014
    Posts:
    315
  32. andrii-shpak

    andrii-shpak

    Joined:
    Nov 27, 2014
    Posts:
    315
    Current verssion was not tested with unity 2017.1.0. Write me to may support mail and I will send you update
     
  33. andrii-shpak

    andrii-shpak

    Joined:
    Nov 27, 2014
    Posts:
    315
    Can't reproduce it. Could you describe your actions before error had happend?
     
  34. sam-perisentient

    sam-perisentient

    Joined:
    Aug 11, 2013
    Posts:
    31
    Thanks! I've sent an email to the address I found on your website.
     
  35. Artaani

    Artaani

    Joined:
    Aug 5, 2012
    Posts:
    423
    @andrii-shpak Hello.

    For some reason I no longer can import hair from Blender.
    Earlier this file worked, but now hair is invisible.

    2017-08-18_03-33-11.png

    Also hair have offset from scalp, but in .blend file everything seems normal.

    I created a test project, here is a project folder (Unity 5.6.1) Blender file included in Assets
    https://1drv.ms/u/s!AjR-sm-wpCtQgf84tGcNTB_Ueke5qg
     
  36. Dorumeka

    Dorumeka

    Joined:
    Aug 19, 2017
    Posts:
    18
    Hi,

    first of all, amazing asset. This hair looks amazing.

    I'm having a small problem. The hair stops rendering at what I thought were seemingly random times. I figured it was happening when this purple cube goes outside of the camera's frustum. What I can't manage to do is move and scale this cube. It may be a dumb question, but how do you correct it?



    Thanks!
     
  37. andrii-shpak

    andrii-shpak

    Joined:
    Nov 27, 2014
    Posts:
    315
    Pink rectangle on scene window is bounding box of hair (it is responsible for a culling), so hair should be in the center of it.
     
  38. andrii-shpak

    andrii-shpak

    Joined:
    Nov 27, 2014
    Posts:
    315
    I'll test it and let you know
     
    Artaani likes this.
  39. Dorumeka

    Dorumeka

    Joined:
    Aug 19, 2017
    Posts:
    18
    How do you move it? The scalp game object (which has the Hair Geometry Creator) cannot be moved, I suspect by your script. And the position of the object that has the Hair Settings script has no effect.
     
  40. xieyun2017

    xieyun2017

    Joined:
    Apr 14, 2017
    Posts:
    9
    Hi,
    I notice that this tool need DirectX11,I'd like to know if it is possible to have a support for OpenGLCore because I need a tool for hair to be used in Linux. Or if it is possible for me to buy this tool and Rewrite it to give it a support for OpenGL, not only tech but alse the permission.
     
  41. andrii-shpak

    andrii-shpak

    Joined:
    Nov 27, 2014
    Posts:
    315
    HairSettings=>StandsSettings=>HeadCenter
     
  42. andrii-shpak

    andrii-shpak

    Joined:
    Nov 27, 2014
    Posts:
    315
    Opengl core seems support compute shaders well. but when I trying to use tesselation (it is major feature for hair tool). Unity editor just crashes. I think we should wait for better support of OpenGLCore
     
  43. andrii-shpak

    andrii-shpak

    Joined:
    Nov 27, 2014
    Posts:
    315
    It's a bug. Could you write to my mail? I'll send you fixed update
     
    Artaani likes this.
  44. andrii-shpak

    andrii-shpak

    Joined:
    Nov 27, 2014
    Posts:
    315
    Or replace line 37 in file
    HairGeometryImporter.cs

    HairGroupsProvider.Process(ScalpProvider.ToWorldMatrix.inverse);
     
    Artaani likes this.
  45. xieyun2017

    xieyun2017

    Joined:
    Apr 14, 2017
    Posts:
    9
    Got it.
    Anyway, thanks for your reply
     
  46. Thermos

    Thermos

    Joined:
    Feb 23, 2015
    Posts:
    148
    Hi,
    The hair is just amazing, but I found some culling issues.
    Hair seems to be invisible if the editor lose focus. Also it would be visible if the hair object is seen by camera in the first frame, it will need to be moved it out of camera then moved back to work.
    Is there a way to force the hair go back online again?
     
  47. andrii-shpak

    andrii-shpak

    Joined:
    Nov 27, 2014
    Posts:
    315
    Unfortunatelly, I can't reproduce this bug(
    Could you provide more delail steps to reproduce
     
  48. Thermos

    Thermos

    Joined:
    Feb 23, 2015
    Posts:
    148
    Sorry for the late reply. This bug can be reproduce by:
    1. Open your demo scene in Editor
    2. Hit play, you should see hairs.
    3. Alt + Tab switch to another application, chrome for example.
    4. Alt + Tab switch back to unity editor.
    5. No more hairs.

    BTW, this bug seems to be editor only, so not very urgent.
     
    Last edited: Sep 4, 2017
  49. leechanghun

    leechanghun

    Joined:
    Jul 21, 2017
    Posts:
    4
    Error ㅠㅠ
    I need help plz.
    (add screen shot)
     

    Attached Files:

  50. Nyxeka

    Nyxeka

    Joined:
    Aug 24, 2015
    Posts:
    20
    Hey there!

    Awesome tool, loving this thing.

    So, I need to figure out, https://i.imgur.com/vCpdXmv.jpg what are those extra hair strands that dont actually have physics on them?
     
Thread Status:
Not open for further replies.