Search Unity

Bug with material preview in project folder

Discussion in 'High Definition Render Pipeline' started by Giustitia, Apr 6, 2020.

  1. Giustitia

    Giustitia

    Joined:
    Oct 26, 2015
    Posts:
    113
    Hi everybody!

    I've runned into an annoying bug and i've been stuck for hours trying to solve it with no succes :(
    Im using Unity 2019.3.7f1, but the bug presist in 2019.3.8f1. In project folder, materials look totally white over a black background. In scene view and also in the material preview inside the Inspector all looks right.

    Any hint about it? :D

    [
     
  2. Giustitia

    Giustitia

    Joined:
    Oct 26, 2015
    Posts:
    113
    I've also tried updating all the RP packages and tweaking values in config but the problem persist. Sometimes, is HDRPAsset is not assigned or lighting is loading (it sometimes happens when you hit play, before load ends) the thumbnails are correctly lighted, but couldn't get it work all the time :(
     
  3. SebLagarde

    SebLagarde

    Unity Technologies

    Joined:
    Dec 30, 2015
    Posts:
    934
    Hi, thanks for reporting this, we will investigate (my guess would be an exposure problem).
     
  4. Giustitia

    Giustitia

    Joined:
    Oct 26, 2015
    Posts:
    113
    Hey, thanks for answering!

    Yes, that was my guessing too. Just to give you more information, it's well displayed if vlaue is equal or almost 0, or saturation is equal or almost 1. It's like post processing exposure is not working for the thumbnail renderer, but I'm not sure if it's supposed to work this way :rolleyes:

    Would you be so kind to tell me if you find a workaround? :D
     
  5. Giustitia

    Giustitia

    Joined:
    Oct 26, 2015
    Posts:
    113
    Just to make you know, I just realised that if you hit play/stop with scene view closed or not showed, materials are shown well (if they dont, just reimport also with scene view closed). Problems come when Unity "reloads" the thumbnails, even for a reimport or a serialization or whatever and scene view is being showed up.
     
  6. JansM

    JansM

    Unity Technologies

    Joined:
    May 20, 2019
    Posts:
    15
    Hey Giustitia,
    I've tried replicating this both on 7f1 and 8f1 and both attempts are unsuccessful. No matter what crazy exposure and light values were used previews remained unaffected.

    Could you provide a repro scene? Also is issue reoccurring when you make a new project from scratch?

    Many thanks!
     
  7. Giustitia

    Giustitia

    Joined:
    Oct 26, 2015
    Posts:
    113
    Hey!

    Problem happens to me on every newly fresh project created from scratch with HDRP template from UnityHub.

    BUT! I just figured out where the problem comes from. It's related with the Exposure from the HDRI Sky inside the Sky and Fog setting Profile assigned to the scene in the lighting tab. If exposure is set to 0, or the profile is not assigned to the scene lighting or whatever, thumbnails are correctly displayed. But obviously, we need to have an HDRI sky with correct values on exposure assigned to our scene to have a fancy enviroment. So, I guess problem come from there and it demands a fix :p
     
  8. Giustitia

    Giustitia

    Joined:
    Oct 26, 2015
    Posts:
    113
    Or to make it easier, just activate/deactivate the "Statick Lighting Sky" setting inside the lighting tab. None = thumbnails work :) HDRISky = ugly thumnbails :(
     
  9. JansM

    JansM

    Unity Technologies

    Joined:
    May 20, 2019
    Posts:
    15
    Hello, sorry for a late reply. Thank you for you repro steps -- they were very helpful and we actually managed to reproduce this with .obj files and reimporting them, with a profile assigned to static sky. We are looking into it, however since previews are a part of core Unity unfortunately there's no easy, straightforward fix yet.

    EDIT Issue is identified and fix is implemented. Backport to 7.x is requested, expect the fix in 7.4 or after that.
     
    Last edited: May 14, 2020
    Ruchir likes this.