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
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.
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
The only red I could see on the screen was at the mouse’s cursor.
@mgeorgedeveloper_1 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.
@mgeorgedeveloper_1@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.
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.
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.
Hi! Your video is no longer available, but I’m very interested to see exactly what problem you had, could you share the video again? I want to find out if this problem is similar to mine.
Hello, Yes last days I removed videos from youtube I wish I couldn’t delete them. I’m sory but there is no video avaiable in my pc too. I wacth your problem it’s quite similar my problem. In my problem while car is going, suddenly screen is getting blackout, like dark flashing. First you need to test whether the problem is caused by NAN.
Have you tested the problem using the Nan feature on the camera? When I activated the Nan feature on the camera, I no longer had a problem with the screen going dark. I looked at so many things to solve the problem. I changed many things and I still don’t know what exactly is wrong but now I got rid of this problem. I will tell you the things I did, maybe you can check them and solve the problem.
First of all, I changed all the terrain objects in the scene. I don’t use slap map, but my terrain resolutions were weird, so the terrains were not square. Instead of 1000 x 1000, each piece was 801 x 605.3 in size. I made all terrains 500x500.
I deleted all the cars in the project and reloaded them and checked all the materials.
I upgraded the version of Unity, I am currently using 2021.3 and I have no problems.
It may be related to the assets you use, I’m sorry I couldn’t offer you the exact solution, this is a very annoying problem, you need to control everything in the scene where you experience this.