Search Unity

  1. Unity 2020.1 has been released.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

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:
    253
    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:
    151
    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:
    253
    @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:
    151
    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:
    253
    What sort of thing should i be looking for?
     
  6. iSinner

    iSinner

    Joined:
    Dec 5, 2013
    Posts:
    151
    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:
    19
    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:
    19
    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:
    19
    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:
    342
    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:
    19
  15. Knipscher

    Knipscher

    Joined:
    Jun 20, 2018
    Posts:
    76
    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. Knipscher

    Knipscher

    Joined:
    Jun 20, 2018
    Posts:
    76
    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:
      264
    Last edited: Oct 29, 2019
    npropp likes this.
  17. peglan

    peglan

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

    olavrv

    Joined:
    May 26, 2015
    Posts:
    219
    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:
    107
    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:
    107
  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:
    12
    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:
    71
    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:
    693
    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:
    71
    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:
    8
    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.
     
  29. DeathRace26

    DeathRace26

    Joined:
    May 26, 2019
    Posts:
    71
    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:
    10
    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. francois85

    francois85

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

    Bordeaux_Fox

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

    Nubaa

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

    Bordeaux_Fox

    Joined:
    Nov 14, 2018
    Posts:
    474
    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!
     
  37. MitschMR

    MitschMR

    Joined:
    Aug 28, 2018
    Posts:
    6
    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:
    5
    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:
    6
unityunity