Search Unity

Bloom flicker / flashing when animated

Discussion in 'Image Effects' started by SpencerPDX, Dec 21, 2019.

  1. SpencerPDX

    SpencerPDX

    Joined:
    Jan 3, 2012
    Posts:
    168
    Hello! Using Post Processing 2.2.2 in Unity 2019.2.11f1, I get an almost strobe-like flashing or flicking from the Bloom effect when I animate the scene:



    EDIT: I guess that .gif won't embed? Well here's a direct link, please check it out:

    https://cupolamedia.com/wp-content/uploads/bloomflash.gif

    Can't seem to find many people having similar issues with recent versions of the post-processing stack.

    Had been running Post Processing 2.1.7, and upgraded to 2.2.2 to see if it would fix this problem.

    Here are my Bloom settings:



    Any thoughts or suggestions? Any help at all would be most appreciated.
     
  2. SpencerPDX

    SpencerPDX

    Joined:
    Jan 3, 2012
    Posts:
    168
    On Reddit, I thought this post had an interesting suggestion:

    Could not see how to increase a brightness map resolution in Unity though.
     
  3. jamespaterson

    jamespaterson

    Joined:
    Jun 19, 2018
    Posts:
    398
    You probably have some nans sneaking into the floating point buffer. I think there might be some options to fix this on the camera component. Or, look at your shaders to see if division by zero is possible. Good luck!
     
  4. SpencerPDX

    SpencerPDX

    Joined:
    Jan 3, 2012
    Posts:
    168
    Thanks very much for the suggestions!

    There is, in the camera's Post Process Layer, a checkbox that says "Stop NaN Propogation," but it was already checked. Tried unchecking and rechecking and it seems to not make a big difference to this particular issue either way.

    Not sure how to check the shaders to see if division by zero is possible, but this is using the Unity Standard shader; would that not be set up correctly already?

    One stopgap measure I've tried: Reducing the bloom intensity from 3 to .5. Not as impactful visually, but it does make the flashing less obvious.
     
    Packfieldboy likes this.
  5. jamespaterson

    jamespaterson

    Joined:
    Jun 19, 2018
    Posts:
    398
    Hey. So having looked at the gif again it is possible i suppose that you are getting small very bright specular reflections on the vehicles which are transient just because of the viewing and lighting directions. If that is the case then even though the end result is undesirable the process is probably working as expected. You could try playing with the metalness / smoothness parameters of the vehicle material to see if reduces the effect. If so, maybe try changing the light direction and or intensity. You could also clip the output of the standard shader (would require a simple customised shader) or maybe try disabling hdr rendering on the camera. Disabling hdr might have negative effects elsewhere however. Good luck!
     
    SpencerPDX likes this.
  6. SpencerPDX

    SpencerPDX

    Joined:
    Jan 3, 2012
    Posts:
    168
    That might just be it. Zooming in close I realized the highlights were super big, a bit overdone for even a gleam of sunlight. Turning down the bloom intensity made the flicker less noticeable, and it then read more like a sparkle. I had also previously turned down the smoothness, and got a toned-down result as you suggest. But then I missed the polished chrome looked and so changed it back. I also tried turning off HDR at one point, but that seemed to simply making the sharp highlights go away, while making broad, flat patches of white glow as if radioactive; a negative result overall. So I changed that back as well.

    Thanks again for your insights!
     
    jamespaterson likes this.
  7. mandeep-wsu

    mandeep-wsu

    Joined:
    Jun 11, 2015
    Posts:
    3
    I had a similar issue. Setting the Threshold value to around 80-90 seemed to fix it.
     
  8. JannickL

    JannickL

    Joined:
    May 18, 2016
    Posts:
    78
    Hi friendo,
    struggled with this too. Simply disable 'Allow MSAA' con camera component. Works for me and the flickers are gone. Bloom is still visible and only the annoying light flickers are gone :)

    Greets,
    Jannick
     
  9. Hungry-Lion

    Hungry-Lion

    Joined:
    Sep 2, 2018
    Posts:
    21
    Thanks friendo,

    Had this for sometime now, disabling MSAA from camera finally worked!
     
  10. jschiefner

    jschiefner

    Joined:
    Nov 6, 2018
    Posts:
    2
    Disabling HDR did the trick for me, thank you! I hope this doesnt bite me in the butt later in development :D
     
  11. HughPerson

    HughPerson

    Joined:
    Apr 14, 2021
    Posts:
    1
    Disabling specular highlights on my mesh material did it for me
     
  12. true_warlock

    true_warlock

    Joined:
    Aug 2, 2019
    Posts:
    60
    If you mean flickering of lighting like when moving around in a scene and using Post Processing, on the Camera turn on Leave Occlusion Culling on, set render Path to Differed, turn off HDR and MSSA.

    keep the Post Processing Layer on the Camera Anti-aliasing to Fast and Approximate, turn on Fast Mode, and keep Differed Fog enabled and exclude Sky box on. That should resolve a lot of the issues with the lighting factor.

    That should resolve the issues.
     
  13. kostiantynyeremenko

    kostiantynyeremenko

    Joined:
    Dec 8, 2022
    Posts:
    5
    none of the above helped me. But changing render scale value on the URP asset from 1 to 2 fixed the flickering
     
  14. kostiantynyeremenko

    kostiantynyeremenko

    Joined:
    Dec 8, 2022
    Posts:
    5
    although increasing the scale value is expensive