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:
    218
    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.

     
  2. iSinner

    iSinner

    Joined:
    Dec 5, 2013
    Posts:
    137
    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:
    218
    @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:
    137
    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:
    218
    What sort of thing should i be looking for?
     
  6. iSinner

    iSinner

    Joined:
    Dec 5, 2013
    Posts:
    137
    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:
    18
    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:
    18
    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:
    18
    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:
    289
    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
     
  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:
    18
  15. Knipscher

    Knipscher

    Joined:
    Jun 20, 2018
    Posts:
    67
    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:
    67
    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:

    Last edited: Oct 29, 2019
  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
     
    Knipscher likes this.
  18. olavrv

    olavrv

    Joined:
    May 26, 2015
    Posts:
    208
    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:
    52
    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:
    52