Search Unity

HDRP models turns screen black

Discussion in 'High Definition Render Pipeline' started by Censureret, Aug 9, 2019.

  1. Censureret

    Censureret

    Joined:
    Jan 3, 2017
    Posts:
    363
    So ive been having this problem for a while and i have no idea what's causing it or how to fix it. Some objects in my scene cause my camera when looked at to turn black as you can see from the gif i made below.

    This is now the 10th time I experience this problem.

    At first, I thought it had something to do with the model itself but the model from the GIF below is a speed tree model which i doubt has the issues.

    The funny thing is that it doesn't happen to all models but rather models that have some sort of LOD group to it.

    The problem is so huge that i pretty much have to delete the model and not use it in my game.

    Has anyone experienced this issue?

    Currently i am using Unity 2019.1 and with the HDRP.

     
    BATTLEKOT likes this.
  2. iSinner

    iSinner

    Joined:
    Dec 5, 2013
    Posts:
    201
    If you have an auto exposure post effect, try disabling it and see if anything changes, it can do that with certain settings.
     
  3. Censureret

    Censureret

    Joined:
    Jan 3, 2017
    Posts:
    363
    @iSinner Thank you for your reply but this happens even if i dont have post processing enabled
     
  4. iSinner

    iSinner

    Joined:
    Dec 5, 2013
    Posts:
    201
    Try using the frame debugger to see what happens at each draw call when the black screen happens, this may lead you into the right direction.
     
  5. Censureret

    Censureret

    Joined:
    Jan 3, 2017
    Posts:
    363
    What sort of thing should i be looking for?
     
  6. iSinner

    iSinner

    Joined:
    Dec 5, 2013
    Posts:
    201
    Look at what happens when the draw call that makes the screen go black occurs, what exactly to look for i don't know, this is what you are trying to find out.

    There may be an arbitrary number of reasons for this to happen, what is it exactly is what the frame debugger is supposed to help you with, not me.

    I wish i knew what the problem is, but it is hard to find out with no project at hand, so i am directing you where i would go, and i would go to the frame debugger to find out.
     
  7. MafiaMoe

    MafiaMoe

    Joined:
    Mar 24, 2013
    Posts:
    27
    I am getting the same issue, which we have been experiencing since switching to HDRP many months ago. I have run the frame debugger and found that during a black frame, everything is normal until it hits the 'Final Pass' in the post-processing.

    *Digging further*

    *Looks like something with the post-processing is causing it, which our game looks meh without...

    **It's the bloom, turning it on to any value above 0 and black frames occur. Turning off every other post-effect except bloom and it still occurs.
     
    Last edited: Sep 9, 2019
  8. MafiaMoe

    MafiaMoe

    Joined:
    Mar 24, 2013
    Posts:
    27
    Here are images of the frame debugging:

    Frame debugger before the 'Final Pass' (which applies the bloom effect): BloomErrorBeforeFinal.PNG

    Frame debugger on the 'Final Pass' step:
    BloomErrorAfterFinal.PNG

    Same render with Bloom effect turned off:
    BloomOff.PNG

    Same render with Bloom effect turned on:
    BloomOn.PNG
     
  9. MafiaMoe

    MafiaMoe

    Joined:
    Mar 24, 2013
    Posts:
    27
    Here is a frame being correctly rendered with bloom on, which requires panning or moving the camera slightly:
    CorrectRender.PNG
     
  10. Fuzzy

    Fuzzy

    Joined:
    Feb 11, 2011
    Posts:
    266
    I'm encountering the same problem with LOD (on a speedtree in my case) and bloom.

    As soon as i get close enough to a tree so it renders LOD 0 and Bloom is enabled I get a black screen.
    Either disabling bloom, or moving back from the tree so it goes to LOD 1 the screen renders correctly.

    Using: Unity 2019.3.0b4 & HDRP 7.1.1

    Is there an active bug report about this?
     
  11. Remy_Unity

    Remy_Unity

    Unity Technologies

    Joined:
    Oct 3, 2017
    Posts:
    703
    Thanks for reporting !
    I'm not aware of this bug, so if you can make a simple reproductible case and report it, that would be awesome !
     
  12. Fuzzy

    Fuzzy

    Joined:
    Feb 11, 2011
    Posts:
    266
    While creating the sample project for the bug report i noticed it's not necessarily tied to the LOD system.
    Just using the LOD0 version of a speedtree gave me the issue. Unless MafiaMoe has a speedtree hidden in his scene it might be tied to some weird mesh edge cases(?) in some 3D models.
    But in my repro project i was only able to get the black screen issue in scene view. Game view seemed to render fine unlike it seems to be the case for MafiaMoe and Censureret.

    Case 1186803
     
    irenya likes this.
  13. mrowton

    mrowton

    Joined:
    Oct 28, 2015
    Posts:
    5
    Thanks for doing the work on this. I couldn't work on my level in one area because of this. At least I'm back up and working. Was there a solution for the actual problem here?
     
  14. MafiaMoe

    MafiaMoe

    Joined:
    Mar 24, 2013
    Posts:
    27
  15. Ehredt

    Ehredt

    Joined:
    Jun 20, 2018
    Posts:
    79
    I've been having the exact same thing! Except for some reason, if I'm using a subsurface scattering diffusion profile, everything turns blue instead of black, like I'm missing the red and green channels. I'm doing a lot of mesh/vertex editing which seems to be the cause of it. I'll post more information as I figure it out -- I don't think I'm using any rectangular lights or post-processing.
     
  16. Ehredt

    Ehredt

    Joined:
    Jun 20, 2018
    Posts:
    79
    Update: for me, it seems to have something to do with NaNs (i.e. black pixels) showing up in areas where I've moved vertices around -- maybe the angles between triangles are too extreme, maybe I've got too many overlapping triangles/verts, maybe the light/something isn't working, but whenever NaNs show up in the frame debugger, my screen goes blue or black depending on what kind of material I use. "Stop NaNs" in the camera settings gets rid of the blue in the camera preview in scene mode, but not in game mode or in the build -- those are both still blue. I'll submit a bug report sometime this week if I get a chance.

    Edited to add: I did have Bloom on and turning it off preventing the black/blue screen issues, but it didn't get rid of the NaNs -- they now show up sometimes in areas where I've edited vertices, as either blue or black pixels. I'm assuming they're NaNs but "Stop NaNs" on the camera doesn't seem to change them. I've attached an image.
     

    Attached Files:

    • NaNs.PNG
      NaNs.PNG
      File size:
      26.5 KB
      Views:
      699
    Last edited: Oct 29, 2019
    jacquesfrety and npropp like this.
  17. peglan

    peglan

    Joined:
    Dec 4, 2016
    Posts:
    2
    Thanks @Knipscher, turning on Stop NaNs worked for me...works okay with blooms as well, Unity 2019.2.6f1
     
    profNoobland, npropp and Ehredt like this.
  18. olavrv

    olavrv

    Joined:
    May 26, 2015
    Posts:
    515
    I have similar issue, but found that it was when looking at certain reflection probes (2019.3.0f1 + HDRP 7.1.5 and newer)
     
  19. Refeas

    Refeas

    Joined:
    Nov 8, 2016
    Posts:
    192
    Not sure if the same issue, but I filed a bug report lately for models turning the screen black (but not because of bloom, but any type of skybox), the thread can be found here.
     
  20. Refeas

    Refeas

    Joined:
    Nov 8, 2016
    Posts:
    192
  21. irenya

    irenya

    Joined:
    Nov 22, 2017
    Posts:
    10
    I seem to have the same exact issue that @Fuzzy describes above. Only happens in the scene view, and it only happens when having a speedtree in the scene.
    It happens most frequently when moving around the scene (with the tree in view) or when selecting / multi-selecting the tree materials. As soon as I disable the tree, everything goes back to normal.
    Doesn't change regardless of PostProcessing settings or type of sky.
    Unity 2019.3.0f1 , HDRP 7.1.6 .
     
  22. keni4

    keni4

    Joined:
    Nov 30, 2014
    Posts:
    31
    Had the same issue on Unity 2019.3.0 f6
    Turns out that the one face UVs (of the model that cause black screen) was collapsed to a line. Unwrapped that face and the bug is gone.
     
    irenya likes this.
  23. DeathRace26

    DeathRace26

    Joined:
    May 26, 2019
    Posts:
    75
    I can also confirm same issue here. Using 2019.3.1f1 and HDRP package 7.2.1 release
     
  24. irenya

    irenya

    Joined:
    Nov 22, 2017
    Posts:
    10
    Had forgotten about this thread. Last week I found a thread in a SpeedTree forum in which someone solved the issue by removing the normal map from the tree trunks (just trunks, branches and leaves seem to be fine). I can confirm that it works and solves the problem. I guess that erroneous UVs/geometry could cause that. It's good to know that's the reason. I'm doing fine without the normals in the trunks (they're terrain trees and none are meant to be seen too up close) but it can be helpful to know to look out for wrong UVs in case you need the normals.
     
  25. Grimreaper358

    Grimreaper358

    Joined:
    Apr 8, 2013
    Posts:
    789
    The cause of the black frame is Reflection Probes. When you look at a probe that wasn't baked correctly that happens so If you rebake all the probe it works as it should.
     
  26. DeathRace26

    DeathRace26

    Joined:
    May 26, 2019
    Posts:
    75
    This makes no sense to me. I had black screens appearing from high intensity lighting in my scene and when i turned down the lux value it got fixed. Now reflection probes and tree barks.... Damn... Every new version announces new bugs.. Im happy that cloth atleast works properly... Still getting errors on removing cloth component but that's another story.. Good luck with fixing devs.
     
  27. npropp

    npropp

    Joined:
    Jul 12, 2019
    Posts:
    1
    This worked for me as well. 2019.30f6
     
  28. ridlr

    ridlr

    Joined:
    Mar 4, 2020
    Posts:
    25
    Try disabling bloom in Edit > Project Settings > HDRP Default Settings > Default Frame Settings > Rendering

    That fixed it for me after hours of searching and trying random things.
     
    LeMonke420 likes this.
  29. DeathRace26

    DeathRace26

    Joined:
    May 26, 2019
    Posts:
    75
    Stopping scene NaN's is a best fix possible
     
  30. plink

    plink

    Joined:
    Mar 23, 2012
    Posts:
    23
    Same issue here. I'm so glad I found this thread.

    For me, using 2019.3 4f1: Stop NaNs does not work. Rebaking reflection probes does not work. Disabling bloom does work.

    Thanks, guys!
     
  31. Nubaa

    Nubaa

    Joined:
    Apr 30, 2013
    Posts:
    18
    I'm having this same problem in 2019.1.7f1. When I turned off bloom, I started seeing stuff like this when you look in certain directions:

    glitch1.jpg

    glitch2.jpg

    This only happens in the build, not in the editor, which has made it hard to work with. I saw in another thread that Unity mentioned using the Render Pipeline debugger to check for NaNs, but when I used it I couldn't find any red pixels so I'm not sure what's going on.

    Any ideas?

    EDIT: If anyone else is having this same problem, it's because I let my main scene's resource file hit the 4gb limit, which I didn't know was a thing.
    https://forum.unity.com/threads/hdrp-rendering-glitches-in-build-but-not-in-editor.902687/
     
    Last edited: Jun 2, 2020
  32. RoughSpaghetti3211

    RoughSpaghetti3211

    Joined:
    Aug 11, 2015
    Posts:
    1,705
    Had the same issues, upgrading to Catalina OS seems to fix my issue
     
  33. Bordeaux_Fox

    Bordeaux_Fox

    Joined:
    Nov 14, 2018
    Posts:
    589
    Please check out if you have any NaN's, for example caused by custom shaders or shader graphs.
     
    nehvaleem likes this.
  34. Nubaa

    Nubaa

    Joined:
    Apr 30, 2013
    Posts:
    18
  35. Bordeaux_Fox

    Bordeaux_Fox

    Joined:
    Nov 14, 2018
    Posts:
    589
    Just in case somebody else has this problem with black screen at certain camera angles: Check if your normal maps have black pixels that will cause NaN's in shaders and therefore cause black screen.
     
  36. faichung_

    faichung_

    Joined:
    May 11, 2020
    Posts:
    1
    If it helps anyone - I solved my objects appearing black when zooming in by unticking Screen Space Ambient Occlusion in the HDRP Lighting settings!
     
    MrSnoop likes this.
  37. MiTschMR

    MiTschMR

    Joined:
    Aug 28, 2018
    Posts:
    487
    I have the same problem with Unity 2019.3.5f1 and HDRP 7.2.1. When painting the terrain, it turns the whole scene black (like in the video above). This doesn't happen on newly created terrains, only on those who have experienced a SRP update/upgrade (in my case from 6.9 to 7.1 and then to 7.2). If i disable bloom in HDRP Lighting settings, then the below effect occurs (very bright light and black square artifacts). Neither stopping NaN's nor disabling everything or rebaking the reflection probes resolves these black squares.

    upload_2020-6-8_12-52-30.png
     
  38. qidrokun

    qidrokun

    Joined:
    Nov 29, 2019
    Posts:
    13
    Recently occurred to me aswell, I followed this tutorial to make ice shader with parallax offset and got it working (I made sure to inspect it to be exact copy of how the guy does it in the vid.)


    I ended up having the effect somewhat work in gameview (not turning gameview dark, but has a short range of visibility), however the big issue is scene view that if i try to view the effect at the scene setup it turns everything black. I dont have an example to send here or such, but it's super easy to replicate the problem. And my current unity version is 2019.2.20f1. Hopefully this is resolved.
     
  39. MiTschMR

    MiTschMR

    Joined:
    Aug 28, 2018
    Posts:
    487
  40. SentryGames

    SentryGames

    Joined:
    Jun 4, 2014
    Posts:
    24
    Hi we had the same issue when we want to down Texture Quality to : Heighth Res.
    We used the HDRP debugger to check NaN and in fact, in this Texture Quality all our scene turn to red (NaN detected).

    But we investigated and if you do the same with the default HDRP scene, and you unzoom, you will have all your scene turning to red (NaN detected).

    It also happen with a simple cube ...

    We are in 2019 with 7.5, any helps?
     
  41. Ymmersive

    Ymmersive

    Joined:
    Jul 6, 2017
    Posts:
    7
    I had a similar issue. None of the suggestions above worked for me--but thanks everyone. I may have a different situation though. It's because of the Planar Reflection Probe. I found out that when I enabled Geometric Specular AA for two Materials of gameobjects in that part of the Scene where the patches occured, they disappeared. That seemed to work for me.

    I'm using 2019.4LTS with HDRP 7.3.1. My scene has reflection probes (baked) and a planar reflection probe. Stop NaNs is not enabled in the Camera. There is also a Post-Processing Volume with Bloom.
     
    Last edited: Dec 29, 2020
  42. dexmex001

    dexmex001

    Joined:
    Oct 9, 2019
    Posts:
    24
    Hello,

    Somtetimes i have the same bug, the scene turn to black sometimes, from some view randomly. This is an limitation if you using HDRP scene. You can use only 8 texture in the terranien layer when using HDRP scene.

    Remove some grond layer texture, if you have more then 8.

    I hope its help
     
  43. Armegalo

    Armegalo

    Joined:
    May 14, 2018
    Posts:
    30
    Turning on StopNaNs worked for me :D
     
  44. Ymmersive

    Ymmersive

    Joined:
    Jul 6, 2017
    Posts:
    7
    I recently switched to Unity 2020.2 with HDRP v.10. It's so far a stable version and I have not yet encountered the dreaded black blocks. :)
     
  45. little1deer

    little1deer

    Joined:
    Apr 26, 2014
    Posts:
    1
    Try enabling "Clear GBuffers" in Edit > Project Settings > HDRP Default Settings > Default Frame Settings > Rendering
     
    MrSnoop likes this.
  46. Erizomusic

    Erizomusic

    Joined:
    May 10, 2017
    Posts:
    2
    Still present in Unity 2020.2.6f1 with HDRP 10.3.2. Only Solution that works for me is putting the total number of textures down to 8 or lower.
     
  47. mrrusby

    mrrusby

    Joined:
    Aug 25, 2021
    Posts:
    7
    I had this exact same thing then messed with the camera settings( next to gizmos) something to do with nan's , so probably clicked most of these settings on and off it was fixed. The odd thing was that only a particular package was doing this even if imported in to a fresh project
     
  48. HIBIKI_entertainment

    HIBIKI_entertainment

    Joined:
    Dec 4, 2018
    Posts:
    595
    You can get NaN errors like this with some screen spaced effects and tools like Nature Renderer.
     
  49. Monsterwald

    Monsterwald

    Joined:
    Jan 19, 2020
    Posts:
    68
    Same issue here :| :| :| brandnew project, zero lights, no global volume, no terrain, no settings changed, everything new and default........ yes, I can use stopNaN but it affects performance
     
    Last edited: Sep 13, 2021
  50. Ruchir

    Ruchir

    Joined:
    May 26, 2015
    Posts:
    934
    I use this tool :oops:, is there some advice might want to give to avoid these issues or what might cause this?:)