Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Bug High Quality Line Renderer not working on Hair System

Discussion in 'High Definition Render Pipeline' started by czipper, Aug 25, 2023.

  1. czipper

    czipper

    Joined:
    Mar 1, 2023
    Posts:
    6
    Hi guys,

    I've been trying to get the High Quality Line Renderer to work but I don't have any success.
    I get the following error:

    Compute shader (ComputeShader-VertexSetup): Property (_VertexBufferPosition) at kernel index (0) is not set UnityEngine.GUIUtility:processEvent (int,intptr,bool&)

    I tried the following with Unity 2023.2.0a22 and Unity 2023.1.10f1 (same problem with both versions):

    1. Created a fresh new "3D (HDRP) Core" Project

    2. Installed the Hair System Package in the Package Manager using this link: "https://github.com/Unity-Technologies/com.unity.demoteam.hair.git"

    3. Installed the "Minimal HairSample" from the Package Manager

    4. Checked that "High Quality Line Rendering" is activated in Edit>Project Settings>Graphics>HDRP Global Settings>Camera>Rendering

    5. Checked that "High Quality Line Rendering" is activated in Edit>Project Settings>Quality>HDRP for all Presets (HDRP Balanced, HDRP High Fidelity, HDRP Performant, HDRenderPipelineAssets)


    6. In the Scene Volume of the Sample Scene I added an Override with "High Quality Line Rendering: Enabled"

    7. In the "Hair Instance" Component of the Scene I set SettingsSystem>StrandRenderer to HDRP High Quality Lines

    8. I get the error message and the Hair isn't rendered anymore - this happens even, when I replace the Hair Shader with a custom Material with "High Quality Lines Support" activated in the shader. I even tried replacing the Shader with the Hair Shader from the Enemies Demo - same problem



    What am I doing wrong? Am I missing something? I am thankful about every answer!!

    When I open the Enemies Demo Project, the High Quality Line Renderer works there, but not in a fresh Unity Project!

    My System:
    CPU 11th Gen Intel Core-i9-11980HK
    GPU Nvidia Geforce RTX 3080 Laptop
    Windows 11
     
    Last edited: Aug 26, 2023
  2. Qleenie

    Qleenie

    Joined:
    Jan 27, 2019
    Posts:
    832
    The error message comes from a bug I already reported. You need to enable decals on both HDRP global camera settings and asset, error should go away. You might also need to choose a render group in hair instance (right below the renderer drop down where you have selected high quality line renderer).
     
  3. czipper

    czipper

    Joined:
    Mar 1, 2023
    Posts:
    6
    Thank you very much for your answer, Qleenie! Sadly the error doesn't go away.
    I have Decals enabled both in "HDRP Global Settings" and in the "HDRP Asset" Profile.
    I also tried choosing a "Strand Render Group", which didn't have any effect.
    Is there something else what may cause this issue?


     
  4. Qleenie

    Qleenie

    Joined:
    Jan 27, 2019
    Posts:
    832
    Hm, this is strange. I also think the error is a bit different than the one I reported. Is the error actually coming from the hair package or from the HDLineRenderer? Maybe you found another bug, unfortunately the HDLineRenderer is very buggy:( if you have a minimal project, best would be to submit it in that case. For me it’s running with similar setup.
     
    czipper likes this.
  5. czipper

    czipper

    Joined:
    Mar 1, 2023
    Posts:
    6
    Hi Qleenie!
    Since the last time I tried the High Quality Renderer without using the example project. I get the very same problem error message there. I also tried on an other Computer using an RTX 3090 with the same result. I sent a Bug Report to Unity but no answer yet.

    You got the High Quality Line Renderer working with your system, have you? I wanted to ask you, if you could maybe send me a minimal working Project for the High Quality Line Renderer for me to test, if the problem exists there as well. That would be amazing and would help in debugging the problem.
     
  6. Qleenie

    Qleenie

    Joined:
    Jan 27, 2019
    Posts:
    832
    It definitely works fine, the bugs other users and I encountered are tied to stuff like loading new hair assets at runtime, memory leaks over time, XR not rendering correctly. Maybe you can also check the Enemies demo from asset store, it also uses this feature. I cannot send my project, and don’t have time to build a new project right now. You could send your project, and I could maybe have a brief look if I see anything setup incorrect.
     
  7. czipper

    czipper

    Joined:
    Mar 1, 2023
    Posts:
    6
    Thank you for having a look on the Unity Project. I have uploaded it to: https://we.tl/t-X6FTete1uA
    I'm looking forward to what your impression is!
    The High Quality Line Renderer works only in the Enemies Demo, but not in any fresh Unity Scene that I setup.
     
  8. Qleenie

    Qleenie

    Joined:
    Jan 27, 2019
    Posts:
    832
    I had a brief look, everything seems fine, but error is thrown for me, too. Has to be some HDRP settings, as even the sample from Unity hair system does not work with HQ lines. No idea what it could be.
    Just do a bug report with the exact same project. I guess you discovered a new bug (other users and I already reported like half a dozen issues related to HQ lines already)
     
    czipper likes this.
  9. czipper

    czipper

    Joined:
    Mar 1, 2023
    Posts:
    6
    Thank you for having a look at the project, Qleenie! This was helpful!

    I have made a bug report now with the issue: IN-52764
     
    Qleenie likes this.
  10. czipper

    czipper

    Joined:
    Mar 1, 2023
    Posts:
    6
    For those, who are experiencing the same issue:

    In the meantime the Unity Q&A Team has answered to the bug report with the following statement:

    Hi,

    Thanks for getting in touch, we actually know about this issue and it’s already fixed, however, the fix hasn’t landed yet.

    Unfortunately, we cannot provide an Issue Tracker link, as this bug is only tracked internally.

    I wrote a question right now if there's an estimation on when or in which Unity version the fix will land. Would be great if there is a fix available for this in one of the next subversions, because without it I see no way on how to make the High Quality Line Renderer work.
     
    Qleenie likes this.
  11. Qleenie

    Qleenie

    Joined:
    Jan 27, 2019
    Posts:
    832
    Let's hope that a fix will land soon. But I don't want to cut down on your hope:
    1) fixes take VERY long currently, depending on the severity level. Chances are that if the fix is already done that a backport might be faster
    2) This is by far not the only bug. High Quality Line Rendering will currently not work in build, unless you manually /locally patch HDRP. Builds will crash after a certain time, while the time to crash seems to be related on the kind of GPU. This bug was supposed to be fixed, but the provided fix did not fix all occurrences of a memory leak.
     
    czipper likes this.
  12. zhangyi010

    zhangyi010

    Joined:
    Aug 16, 2019
    Posts:
    3
    Hi, My team encountered the same problem. Builds will crash after a certain time. I tried to put the hair of Enemies to my project, it didn't crash in builds, but the hair made by my teammates crash. In the editor, it works well. Do you hava any good news?
     
  13. Qleenie

    Qleenie

    Joined:
    Jan 27, 2019
    Posts:
    832
    Seems it got fixed, but only in alpha :( there are several bugs awaiting back ports. Not sure why it’s not done.
     
  14. zhangyi010

    zhangyi010

    Joined:
    Aug 16, 2019
    Posts:
    3
    You mean the crash after build to exe is fixed?The hair system version I used is same as Enemies.It has the crash problem.
     
  15. Qleenie

    Qleenie

    Joined:
    Jan 27, 2019
    Posts:
    832
    The ticket says it was fixed in alpha 2023.3, but not backported yet. The bug is in High Quality Line Renderer, which is part of Unity Editor, not in the hair system.
     
  16. zhangyi010

    zhangyi010

    Joined:
    Aug 16, 2019
    Posts:
    3
    ok, thank you very much. I'll try it later.
     
  17. Ulven2

    Ulven2

    Joined:
    Apr 23, 2012
    Posts:
    64
    I'm still seeing this bug in 2023.3.0b2