Search Unity

Resolved Screen blackout error that I can't find

Discussion in 'High Definition Render Pipeline' started by oguzkaancomoglu, Mar 10, 2023.

  1. oguzkaancomoglu

    oguzkaancomoglu

    Joined:
    Aug 18, 2021
    Posts:
    50
    Hello, I'm developing game in HDRP. I did not encounter an error in both the editor and the build on my computer. ( I check the built game with the in-game debug console ). I don't get any errors in screen and in the console.

    Also I'm checking game for another computer to see any error. I saw two different computer same error. The in-game debug console didn't show any errors. The error is blackout screen. I shared the video how it's happening.



    Can someone tell me how I can find the error ?

    There is one thing that I just observed distinctly, it gives this error on Nvidia GTX 950 and RTX 2060. It works fine on Nvidia 1050, 1650, Amd 6700XT.

    My own hardware system, Nvidia gtx 1650 and Intel i5.
    I'm using 2021.1.28f1 in Unity
     
  2. HIBIKI_entertainment

    HIBIKI_entertainment

    Joined:
    Dec 4, 2018
    Posts:
    595


    You're likely getting a Screen Spaced Post Process NAN or, you've missed terrain painting somewhere and that's creating a NAN.

    In HDRP you can use the Rendering Debugger to help you find Terrain Layer NANs
    the screen will go grey and you'll see Red where layers have caused NAN.
    ( may not work with some related third-party assets, may still be caused by third-party assets)

    2021+ Window > Analysis > Rendering Debugger > Rendering (TAB) > Full Screen Debug Mode (Dropdown) > Nan Tracker

    For screen-spaced NANs from post processes, they're a little more difficult to find, but usually, we generally toggle the effects off and on ( or reduce to 0 if overrides present)and view with default layout and free aspect. Sometimes if you use the slider multiplier on the game window, you see a centre pixel freaking out.


    For you though, it seems more like the former with terrain since it happens at certain points.

    if it is the terrain for fixing that, you just have to ensure the terrain splat has all colour channels accounted for, if you're generating the splat map outside of unity be sure RGBA RGBA (whatever you're using per terrain tile) is accounted for.
    If you're using a procedural tool that creates splats inside unity, inform the developer to clamp their values properly to avoid NANs and for you're self try to retune the values on your side.

    if you're able to see the NAN errors with the debugger like this, it'll make tuning much faster.
    without the debugger on, sometimes you'll see a terrain layer NAN will just be a black Square, or patches of them on the ground.

    Goog luck and i hope that helps.
     
  3. oguzkaancomoglu

    oguzkaancomoglu

    Joined:
    Aug 18, 2021
    Posts:
    50
    Thank you for your answer.

    Yes, I tested what you said today, I clicked the NAN option, but as you said, I couldn't see anything red on the screen. I played with the resolution, opened and closed the post process, changed the Bloom values from zero to the max values, but unfortunately I couldn't see anything on the screen. The strange thing is that some video cards do not have this error. Now I'm going to make a built that turns on/off the features I suspect and test it. I didn't use splatmap for Terrain, but I used procedural terrain painter. I don't think there could be a place in Terrain that he didn't paint. I couldn't see any red marks on the terrain

    I made the debug settings as follows, but
    upload_2023-3-13_22-26-38.png

    The only red I could see on the screen was at the mouse's cursor.
    upload_2023-3-13_22-27-9.png

    These red codes were happening where I moved the mouse.

    Something like what you said is causing it, I hope I can find it.
     
  4. mgeorgedeveloper

    mgeorgedeveloper

    Joined:
    Jul 10, 2012
    Posts:
    324
    " I didn't use splatmap for Terrain, but I used procedural terrain painter."

    Coming in totally blind here with my random unfounded opinion - but this sounds like a good place to start looking.
     
  5. HIBIKI_entertainment

    HIBIKI_entertainment

    Joined:
    Dec 4, 2018
    Posts:
    595
    @oguzkaancomoglu

    @mgeorgedeveloper is right and I would certainly look into your procedural tool.

    Especially if you've used something like Microverse which can easily NAN on the splat generation, as I previously mentioned with some procedural tools the NaN just doesn't appear, I'm not sure if it's being surpressed or you'll only see it on a final unity terrain/built in shader.

    In terms of the debugger you can uncheck the colour picker mode too since that does process before many passes like post processing and tone mapping.

    Good luck again and I hope you find where the issue is soon. Do keep looking.
     
  6. oguzkaancomoglu

    oguzkaancomoglu

    Joined:
    Aug 18, 2021
    Posts:
    50
    @mgeorgedeveloper @HIBIKI_entertainment
    I made a buttons to control scene elements for understand which object is caused this problem. As you see in image, none of them causing the problem. I manually disable all of them but problem was still going. Then I changed the car, it's did not occur anymore. I think problem is car which is seen on image. I'm going to work on it which material or shader causes the problem.

    Additionally, The camera has NAN options, when I enable NAN for camera even if this car on scene there is no problem occured. As I read, this options can cause some performance loss. I think Camera NAN opitons is the great solution, It can save the day untill find the problem.

    As a note, I would like to point out the following. We ran the tests remotely on a friend's computer. He said that the Camera NAN feature did not cause low fps problems.

    upload_2023-3-16_10-38-12.png
     
    HIBIKI_entertainment likes this.
  7. HIBIKI_entertainment

    HIBIKI_entertainment

    Joined:
    Dec 4, 2018
    Posts:
    595
    Interesting solve and well done on figuring out it was the car all along phew!

    I rarely use the Camera NaN to be honest, mostly cause I'd like to know what it is first but I get that you'd like to keep progressing too.
    Great to hear from you and well done.
     
    oguzkaancomoglu likes this.
  8. oguzkaancomoglu

    oguzkaancomoglu

    Joined:
    Aug 18, 2021
    Posts:
    50
    Thank you for your information and help. It's really hard to find a solution when you don't have someone to guide you and it's a different problem you're facing.

    I am now conscious of other mistakes. Thanks :)
     
    HIBIKI_entertainment likes this.