Search Unity

SE Natural Bloom Dirty Lens

Discussion in 'Assets and Asset Store' started by sonicether, Apr 29, 2014.

  1. timsoret

    timsoret

    Joined:
    Apr 9, 2015
    Posts:
    16
    Made some tests. It's actually a Unity issue. Mac 10.11.6, Unity 5.6.0f3.
    No post processing works at all in scene view, except some effects from the post-processing stack like Ambient Occlusion & Screen Space Reflections…
     
    RB_lashman likes this.
  2. Stormy102

    Stormy102

    Joined:
    Jan 17, 2014
    Posts:
    495
    Are you sure image effects are enabled in the scene view? You can enable them under Gizmos i think...
     
    RB_lashman likes this.
  3. Dwair77

    Dwair77

    Joined:
    Sep 19, 2013
    Posts:
    4
    I'm also in MacOS 10.12.24 and Unity 5.6.0f3 and SE Natural bloom & Dirty lens is not working at all, no editor or iOS platform. It was working in 5.3.2 but now shows up "The camera is either not HDR enabled or has an effect that converts to LDR" warning. There are no other effects in this or other cameras, and HDR is enabled, also MSAA is disabled.

    Any news about this problem? I'm trying to get RenderTexture format forced somehow, but any help would be great on this ;)
     
    RB_lashman likes this.
  4. Stormy102

    Stormy102

    Joined:
    Jan 17, 2014
    Posts:
    495
    Make sure that Anti-Aliasing is disabled in Quality Settings... Also make sure you are in Linear lighting, not gamma and deferred settings (Graphics) is recommended
     
    RB_lashman likes this.
  5. Dwair77

    Dwair77

    Joined:
    Sep 19, 2013
    Posts:
    4
    Disabled MSAA, used linear lighting and metal support only (no OpenGLES 2 or 3) but still having this issue, deferred lighting was also legacy in 5.6. I rollbacked again to 5.3.2 and works fine though, so I'll stay with it a little longer ;)
     
    RB_lashman likes this.
  6. Stormy102

    Stormy102

    Joined:
    Jan 17, 2014
    Posts:
    495
    This only happens on OSX? How about 5.5?
     
    RB_lashman likes this.
  7. Dwair77

    Dwair77

    Joined:
    Sep 19, 2013
    Posts:
    4
    I've just tested it in 5.5 in MacOS and it's working both in platform and editor, so it must be a Unity issue.
     
    RB_lashman likes this.
  8. Stormy102

    Stormy102

    Joined:
    Jan 17, 2014
    Posts:
    495
    Ok cool maybe report it as a bug?
     
    RB_lashman likes this.
  9. TimLee9024

    TimLee9024

    Joined:
    Jun 22, 2015
    Posts:
    2
    Since Unity 5.6 support HDR with MSAA. I tested SENBDL with that set up, but it gave me strange flickering. I also test other Bloom such as in PRISM and Post Processing Stack, and the result was same. It probably is a Unity issue again.

    MSAA Disable.png
    MSAA 8X.png

    EDIT: This seems to only happened on Legacy Specular Shader.
     
    Last edited: May 13, 2017
    RB_lashman likes this.
  10. DragstMan

    DragstMan

    Joined:
    Oct 18, 2013
    Posts:
    1
    Found out the problem with any post process not working in 5.6.1f1, there's this new bizarro graphic setup page in edit -> project settings -> graphics:



    As you can see all the tier settings have "Use HDR" disabled by default. Just don't use defaults and manually set it to true and HDR seems to work like a charm again. To add some confusion, our other developer has it enabled by default, because "thanks Unity" :rolleyes:
     
  11. Quatum1000

    Quatum1000

    Joined:
    Oct 5, 2014
    Posts:
    889
  12. TooManySugar

    TooManySugar

    Joined:
    Aug 2, 2015
    Posts:
    864
    Hi.This asset is a blast.
    is basically 3 in one. But the epic part to me is the per object glow.

    I just have one request. I want to also use it for a termal cam. The issue is that I use an invert filter so the White turns out to be black and I find no way to get a black glow. Even if I put the SEN filtere after the inversión in teh stack.

    Any tips? If not posible as is could you please add an "invert" checkbox/bool that can be accesed via script?
     
    RB_lashman likes this.
  13. sonicether

    sonicether

    Joined:
    Jan 12, 2013
    Posts:
    265
    In order to get the "black glow" you're looking for, you'll want to make sure your "color invert" image effect is rendered after SENBDL. So, make sure your invert effect script is below SENBDL in the scripts stack on your camera.
     
    Stormy102 and RB_lashman like this.
  14. Elecman

    Elecman

    Joined:
    May 5, 2011
    Posts:
    1,371
    Is that fog blur effect going to be added to SENBDL anytime soon? It looks really good :)
     
    RB_lashman likes this.
  15. TooManySugar

    TooManySugar

    Joined:
    Aug 2, 2015
    Posts:
    864
    Thanks for your quick answer, I think I explained myself poorly.

    Here is the actual image of the environment in thermal (ground is wrong). It is not meant to be realistic or anything but like somwhat termal-ish environment. like the base, probalby will darken further.
    https://1drv.ms/i/s!AuliwwO_siw1hzCriwhI9SVWJaFr

    On top of this I need White glow for hot stuf like bullets of vehicles. For the glow to be White, as the image is already inverted, I would need the glow to be black beforehand so it tourns out to be White. So I would need a way to invert just the SEN output. I tried to invert the objets shader color and it renders just black before invert without glow. If I invert SEN shader whole image gets inverted :\
     
    John-G and RB_lashman like this.
  16. Corvwyn

    Corvwyn

    Joined:
    Nov 15, 2013
    Posts:
    114
    Stormy102, Elecman, chelnok and 2 others like this.
  17. TooManySugar

    TooManySugar

    Joined:
    Aug 2, 2015
    Posts:
    864
    Hello again, today I did again test moving the invert filter ahead the SENDBL one and while I can see other camera effects be affected by this, the glow keeps invertir no matter where the invert is. Any clues?
     
    RB_lashman likes this.
  18. TooManySugar

    TooManySugar

    Joined:
    Aug 2, 2015
    Posts:
    864
    upload_2017-9-22_23-55-26.png

    I'm trying to find a camera filter fx that inverts, like the one I use but different to see if that one does not invert SENDBL independently of its poosition in the camera filter stack like this one does.
    Avobe image is the same no mater where I put the invert filter. I did modify SENDBL script and also the shader to invert color but in both cases got same issue. May be is SENDBL applying the effect after all teh filters are applied?
     
    RB_lashman likes this.
  19. TooManySugar

    TooManySugar

    Joined:
    Aug 2, 2015
    Posts:
    864
    Ended up doing a glow based on threshold :\
    upload_2017-9-24_1-43-52.png
    upload_2017-9-24_1-44-15.png
     
    RB_lashman likes this.
  20. IronDuke

    IronDuke

    Joined:
    May 13, 2014
    Posts:
    132
    ...and now I want to play War Thunder. >.> I blame you!:D

    --IronDuke
     
  21. Bradamante

    Bradamante

    Joined:
    Sep 27, 2012
    Posts:
    300
    After updating from Unity 5.x to 2017.2 I just get a white image. Even the demo scene from the SE Bloom download does not work anymore. Does this asset need some update for 2017.2?
     
    RB_lashman likes this.
  22. TooManySugar

    TooManySugar

    Joined:
    Aug 2, 2015
    Posts:
    864
    It would certainly cool to have an upgrade and please support for single pass stereo
     
    RB_lashman likes this.
  23. Quatum1000

    Quatum1000

    Joined:
    Oct 5, 2014
    Posts:
    889
    2025
     
    tbg10101_ and RB_lashman like this.
  24. JPhilipp

    JPhilipp

    Joined:
    Oct 7, 2014
    Posts:
    56
    Hi! I just bought your asset to test for using in sandbox universe Anyland, but the screen turns up black when the component is added and it shows the message "The camera is either not HDR enabled or there is an image effect before this one that converts from HDR to LDR. HDR is not compatible with MSAA; ensure that anti-aliasing is disabled in the project quality settings. This image effect is dependant an HDR input to function properly." (i.e. !instance.inputIsHDR).

    However, I have HDR enabled on the camera, and it's enabled in the Graphics settings too, and it also doesn't work when anti-aliasing is off. I am using SteamVR though as it's a VR project. (I've heard of the asset through SoundStageVR which uses it, so I figure it can work in VR.) We're using Windows 10 - Unity 2017.2.0f3 - Vive.

    Help please? Thanks!
     
    RB_lashman likes this.
  25. TooManySugar

    TooManySugar

    Joined:
    Aug 2, 2015
    Posts:
    864
    Please update to Unity 2018, This asset was a blast, we can´t let it go!
     
    RB_lashman likes this.
  26. TooManySugar

    TooManySugar

    Joined:
    Aug 2, 2015
    Posts:
    864
    Ok I was having issues yet decided to try again in a blanc project. Tested on 2018.2.0f2 Seems to be working!
     
    chelnok and RB_lashman like this.
  27. TooManySugar

    TooManySugar

    Joined:
    Aug 2, 2015
    Posts:
    864
    Yes there is so jitter in teh central cube but it does not feel totally broken, It looks like I could still use for the bullet glows!!!

    edit: Hitter was due to MSAA!!! its working fine!!!
     
    Last edited: Aug 20, 2018
    RB_lashman likes this.
  28. TooManySugar

    TooManySugar

    Joined:
    Aug 2, 2015
    Posts:
    864
    Ok more good, indeed AWESOME NEWS!!- --->It's working on Xbox One!!!
     
    RB_lashman likes this.
  29. TooManySugar

    TooManySugar

    Joined:
    Aug 2, 2015
    Posts:
    864
  30. Bradamante

    Bradamante

    Joined:
    Sep 27, 2012
    Posts:
    300
    Since the update from Unity 2017.2.x to Unity 2018.2.1 (and then 2018.2.6) I get his error message in the Unity editor when I have the SENaturalBloomAndDirtyLens script on my camera and the editor renders a frame:

    Code (csharp):
    1.  
    2. ArgumentNullException: Value cannot be null.
    3. Parameter name: shader
    4. UnityEngine.Material..ctor (UnityEngine.Shader shader) (at /Users/builduser/buildslave/unity/build/Runtime/Export/Shader.bindings.cs:104)
    5. SENaturalBloomAndDirtyLens.OnRenderImage (UnityEngine.RenderTexture source, UnityEngine.RenderTexture destination) (at Assets/Plugins/Sonic Ether/Natural Bloom/Scripts/SENaturalBloomAndDirtyLens.cs:53)
    6.  
     
    RB_lashman likes this.
  31. McDev02

    McDev02

    Joined:
    Nov 22, 2010
    Posts:
    664
    I had these heavy jitters, they seem to be caused by spotlights with shadows.
    It produces heavily dark pixels, maybe the lowest value available. Without HDR they are white.

    Now math errors might turn these to heavy white when adding them together, the result are these heavy flashes.
    The best fix seems to be to clamp these to black. Therefore simply add this line to the fragClamp function in SENaturalBloomAndDirtyLens.shader. Add it before the maximum clamp is being applied.

    Code (CSharp):
    1. half4 source = tex2D(_MainTex, coord.xy);
    2. source.rgb = max(source.rgb, 0);
     
    RB_lashman likes this.
  32. Brechtos

    Brechtos

    Joined:
    Sep 18, 2014
    Posts:
    18
    @McDev02 check out this reply from a couple of years ago ;) : https://forum.unity.com/threads/se-natural-bloom-dirty-lens.243430/page-7#post-2497998
     
    RB_lashman likes this.
  33. McDev02

    McDev02

    Joined:
    Nov 22, 2010
    Posts:
    664
    I see :) Btw I filed a bug report, still not fixed? mhm
     
    Last edited: Nov 17, 2018
    RB_lashman likes this.
  34. Brechtos

    Brechtos

    Joined:
    Sep 18, 2014
    Posts:
    18
    Nope but been using this asset all they way to the latest 2018 version with the suggested fix. Working like a charm.
     
    RB_lashman likes this.
  35. Burntaces

    Burntaces

    Joined:
    Feb 23, 2016
    Posts:
    4
    Hi there, I've just started playing around with this asset and can't seem to get the demo scene to work correctly. Objects are appearing in pure white instead of how they appear on the main asset page. I noticed some warnings and prompts from the camera and asset components and have tried to follow them but the demo results have stayed the same.

    I also played around with effect similar to what was posted here but couldn't get similar results (please see below)

    Unfortunately this users posts are quite old so I haven't attempted to contact them and the setup tutorial that was posted to achieve the effect above no longer exists.

    If any of you have any tips on how to learn how to use the asset that would be appreciated as I'd love to use it in my game. Thanks!
     
    RB_lashman likes this.
  36. Stormy102

    Stormy102

    Joined:
    Jan 17, 2014
    Posts:
    495
    Looks like it's been Depreciated on the Asset Store. This asset is well and truly dead.
     
    RB_lashman likes this.
  37. sonicether

    sonicether

    Joined:
    Jan 12, 2013
    Posts:
    265
    chelnok, Stormy102, McDev02 and 5 others like this.
  38. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,682
    chelnok, Gekigengar and RB_lashman like this.
  39. timothyallan

    timothyallan

    Joined:
    May 22, 2013
    Posts:
    72
    Whoa, from left field! :)
    Are there any revisions from the App store version? I'd bought it ages ago and won't bother replacing it if not.
     
    Gekigengar and RB_lashman like this.
  40. sonicether

    sonicether

    Joined:
    Jan 12, 2013
    Posts:
    265
    Nope, it's the same version from the Asset Store. I did have an experimental version that had a low-quality mode and depth-based blending, but I never uploaded it. If I can find it, I'll put it on a different branch and upload it to the github page.

    EDIT: Oh, looks like I actually did upload the latest development version (newer than what was on the Asset Store with depth blending and LQ options). This version, if I recall correctly, also has slightly better bloom distribution with tighter "fine scale" bloom. Looks like there are some issues to fix, I'll work on those.
     
    Last edited: May 7, 2019
    chelnok, ftejada, Gekigengar and 2 others like this.
  41. sonicether

    sonicether

    Joined:
    Jan 12, 2013
    Posts:
    265
    Alright, I've fixed some issues and cleaned the code up a bit, for anyone who wants to fork and work on it themselves.
     
    chelnok, zhuchun, ftejada and 6 others like this.
  42. Quatum1000

    Quatum1000

    Joined:
    Oct 5, 2014
    Posts:
    889
    Great! Thanks for the upload.. 2019.1.1f1
    - Unfortunately one script camera is missing.
    - It's not possible to change any values at run time and they are not serialized by SENaturalBloomAndDirtyLensEditor. Slider stuck and you can not change values for any reason.
    - Cube mesh and others are missing.. (not important)

    // Some fixes:

    Fix_#1
    08,05,2019 // Class SENaturalBloomAndDirtyLens cause a Null exeption : rtWidth, rtHeight < 0
    RenderTexture rt = RenderTexture.GetTemporary(rtWidth, rtHeight, 0, source.format);
    Redertexture below a octave, cause RT null.

    Code (CSharp):
    1. for (int i = 0; i < octaves; i++) {
    2.    // 08,05,2019 :  start_fix_01#
    3.    if (rtWidth <= 0 || rtHeight <= 0) break;
    4.    // 08,05,2019 :  end_fix_01#
     
    Last edited: May 8, 2019
    Gekigengar and RB_lashman like this.
  43. Quatum1000

    Quatum1000

    Joined:
    Oct 5, 2014
    Posts:
    889
    Found the reason because not able to change the Main.Camera bloom values. The demo SENBDLMainCube overrides ShaderValue.bloomIntensity with another value. They can changed by keyboard commands. curLeft/curRight etc only. Without SENBDLMainCube all works well as expected.

    * SEBloom now supports multiple camera instances.
     
    chelnok and RB_lashman like this.
  44. Pourya-MDP

    Pourya-MDP

    Joined:
    May 18, 2017
    Posts:
    145
    hey @sonicether a quick question here , i noticed if i use color grading in my cinemachine post extension your effect will not work , how to reorder them to work properly since the senbdl is not present as a postprocess effect and its attached to main camera directly?