Search Unity

SE Natural Bloom Dirty Lens

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

  1. Elecman

    Elecman

    Joined:
    May 5, 2011
    Posts:
    1,374
    @sonicether,
    Can you add the new HDR color picker to the material?
     
  2. DivergenceOnline

    DivergenceOnline

    Joined:
    Apr 19, 2015
    Posts:
    244
    No and it sucks because I'm dying to get my hands on that update as well!
     
    RB_lashman likes this.
  3. RB_lashman

    RB_lashman

    Joined:
    Aug 15, 2013
    Posts:
    92
    you didn't hear this from me, but ... #soon ;)
     
  4. sonicether

    sonicether

    Joined:
    Jan 12, 2013
    Posts:
    265
    I'm so sorry for the wait! I've been incredibly busy lately but I'll let you guys know that I just finished fixing up bugs and ensuring Unity 5 compatibility. I tried to upload the update earlier today but had no success (perhaps server issues). I'll try again and let you know when the update has been submitted. Should take a few days after that for the update to be approved and put on the Asset Store.

    This update was really just to smooth out overall functionality and ensure Unity 5 support. I'll continue working on more advanced features like lens flare and diffraction spikes as I have the time and post updates here on how that's going.

    Thanks for you understanding. :)
     
  5. Elecman

    Elecman

    Joined:
    May 5, 2011
    Posts:
    1,374
    Will world space lens dirt (for on a windscreen) be in there as well?
     
  6. mkgm

    mkgm

    Joined:
    Apr 10, 2015
    Posts:
    134
    RB_lashman likes this.
  7. Ibralosh

    Ibralosh

    Joined:
    Dec 17, 2014
    Posts:
    5
    I have an issue with the latest version of Natural Bloom. I'm using Unity v5.0.2f1 (Personal) and I get these very bright spots from the leaves of some of my speedtrees.

    upload_2015-5-27_20-27-31.png

    With the previous version of Natural Bloom everything was working fine. Is there a way to avoid these effects?
     
  8. sonicether

    sonicether

    Joined:
    Jan 12, 2013
    Posts:
    265
    Oh... that's strange.

    Could you try something for me? Open up SENaturalBloomAndDirtyLens.cs (in Sonic Ether/Natural Bloom/Scripts) ..

    Take a look at line 75:

    Code (CSharp):
    1. downsampled = clampedSource
    and change it to
    Code (CSharp):
    1. downsampled = source
    Could you let me know if that fixes your issue? That would revert the only major change in this update. If that fixes your issue then I know where to start.

    Additionally, are there any light sources in your scene? Sometimes shaders with 100% smoothness result in crazy spikes of intense specular highlights that seem to be random. Do you see white pixels when you turn the effect off?
     
    RB_lashman likes this.
  9. yezzer

    yezzer

    Joined:
    Oct 30, 2009
    Posts:
    143
    Hey I had an odd issue with some Speetree trees - in the V there was an odd artefact - see my thread on Twitter:
    https://twitter.com/yezzer/status/595347233777811457 - is that the same thing? I had a similar effect when using SE Natural Bloom.. Just wondering..
     
    RB_lashman likes this.
  10. Ibralosh

    Ibralosh

    Joined:
    Dec 17, 2014
    Posts:
    5

    I changed the line of code and after that the effect is gone. While trying this I found something else that might explain the problem. The speedtrees have a completely white (with NaturalBloom activated) / black (with NaturalBloom deactivated) spot (see screenshot).

    upload_2015-5-28_19-49-33.png

    I guess this causes these extremely bright effects. I originally thought it would be the leaves, but after taking a closer look, it is only this spot of the tree. With the older version of NaturalBloom there is no such bright effect, so I didn't see these spots before updating to the latest version.
    Original trees made by Speedtree - and there are textures missing... :-(

    Thanks for your help - I guess I just have to fix that missing texture issue with the speedtree and everything should be fine.

    Regards,
    Patrick
     
    RB_lashman likes this.
  11. yezzer

    yezzer

    Joined:
    Oct 30, 2009
    Posts:
    143

    See my link - that's the same problem. There's something in the speedtree import settings you can change which fixes it. They were due to issue an update to fix it, unsure if it's live yet though.
     
    Ibralosh and RB_lashman like this.
  12. Ibralosh

    Ibralosh

    Joined:
    Dec 17, 2014
    Posts:
    5
    You're right. I will try to find the correct import settings today. Thanks!
     
    RB_lashman likes this.
  13. mkgm

    mkgm

    Joined:
    Apr 10, 2015
    Posts:
    134
    @Ibralosh, @yezzer:
    please, when you find the correct import settings for speedtree, could you share with as?
    Thanks!
     
  14. yezzer

    yezzer

    Joined:
    Oct 30, 2009
    Posts:
    143
    I made a note that says "disable normal" - but I don't know what that means, and both my PCs are locked up lightmapping at the moment! doh.. does that make any sense? I remember selecting the relevant trees in Project window, then doing something in the inspector.. but I can't remember what..
     
  15. yezzer

    yezzer

    Joined:
    Oct 30, 2009
    Posts:
    143
  16. Dannyoakes

    Dannyoakes

    Joined:
    Feb 10, 2015
    Posts:
    118
    Hey guys,

    What's happening here is the bifurcation angle in this one spot is causing an overlap in the normals, crashing the shader. This seems to be a quirk that doesn't show up in our modeler or a few other places so we didn't catch it.

    Solely for the sake of reference, If you open up the modeler you can adjust the parameters for the web bifurcation, essentially just tweaking the angle of the normal map eliminating the error.

    Of course, that's not a fix for having this problem in our pre-made asset. We'll have the model corrected and available for download shortly. Sorry about the inconvenience! I'll update here when its confirmed ready to download.
     
    yezzer and RB_lashman like this.
  17. Dannyoakes

    Dannyoakes

    Joined:
    Feb 10, 2015
    Posts:
    118
    The models have been updated on the SpeedTree and Unity Asset store. Redownloading the model will correct the issue.
     
    yezzer and RB_lashman like this.
  18. Elecman

    Elecman

    Joined:
    May 5, 2011
    Posts:
    1,374
    @sonicether,

    I noticed a lot of shimmering when bright small lights are used. I suppose this is because one extra pixel on a small object causes percentually way more bloom then one extra pixel on a big object.

    Any change of smoothing this out?
     
  19. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    just a quick note regarding shimmering, we never seem to see this and we use SE bloom. I think it's because the values/ranges are within acceptable margins. Is everyone on linear/deferred?
     
    RB_lashman likes this.
  20. Elecman

    Elecman

    Joined:
    May 5, 2011
    Posts:
    1,374
    You won't see the shimmering if the emissive object is large enough. But try to make it a few pixels in size (either small or far away), and shimmering becomes an issue. This is with linear and deferred. Note the shimmering on the green bar.

     
  21. Instability

    Instability

    Joined:
    Apr 16, 2012
    Posts:
    288
    Just saw that SENDBL has been updated a few days ago! Will try the update now.

    Thanks SE, glad to see you're working on the plugin!

    Here is what I did with SENDBL:

     
  22. randomperson42

    randomperson42

    Joined:
    Jun 29, 2013
    Posts:
    974
    I'm thinking about picking this up on sale.

    This has probably been asked before, but how is performance in comparison to Unity's image effects bloom from the standard assets?
     
  23. sonicether

    sonicether

    Joined:
    Jan 12, 2013
    Posts:
    265
    In my testing, less than the cost of two default Unity blooms (Unity bloom: 0.29 ms, SENBDL: 0.49 ms).
     
    randomperson42 and RB_lashman like this.
  24. ArsKvsh

    ArsKvsh

    Joined:
    Dec 13, 2014
    Posts:
    17
    Hi Sonic Ether! I'm a new user of your asset and I have some thoughts about it. So is it possible to add some advanced mode to the SENBDL? It would be great if there was ability to control intensity of bloom passes and radius of blur. I've tried to edit some values in the code of shader and I've got fantastic result. Also it would be so good if you would make the asset work in gamma color space. I had to rework some things in my project to make the asset work with my project.
    I think that changes would make the asset more universal to use. Hope you will add some of my small thoughts. :)
    P.S. Sorry for my English if it is bad. I'm not a native English speaker.
     
  25. Stexe

    Stexe

    Joined:
    Feb 2, 2014
    Posts:
    217
    Any info on how well it works on mobile? Or if you'll be adding some type of mobile version in the future?
     
  26. cmart

    cmart

    Joined:
    Jul 10, 2012
    Posts:
    121
    Hello,

    So I noticed some people were reporting issues using this with UFPS, has this problem been fixed?
     
  27. Mr-Stein

    Mr-Stein

    Joined:
    Dec 4, 2013
    Posts:
    169
    Hi @sonicether! you asset look great.. I have send a PM.
     
  28. DivergenceOnline

    DivergenceOnline

    Joined:
    Apr 19, 2015
    Posts:
    244
    So just so we're clear, if you're using 4.6 Pro like my project is, there's no point in waiting on your GI asset since you said in your twitter way back in February that it won't support 4, right?
     
  29. sonicether

    sonicether

    Joined:
    Jan 12, 2013
    Posts:
    265
    Sure, I'll definitely consider more advanced control in the future, probably along with diffraction spikes and other lens effects.

    I'll have to look into this more. I don't own UFPS, so I'll have to pick it up and do some testing. Can anyone else comment on this issue?


    It would take a lot of workarounds for it to work properly in 4.6--either using a specific custom shader for everything or rendering the scene multiple times to obtain the required information. It's quite impractical with the limitations of Deferred Lighting in Unity 4. Because of this, yes, it's unlikely that it'll be Unity 4 compatible.
     
    RB_lashman likes this.
  30. Elecman

    Elecman

    Joined:
    May 5, 2011
    Posts:
    1,374
    The shaders are not affected by fog in Unity 5. Can you fix that?
     
  31. cmart

    cmart

    Joined:
    Jul 10, 2012
    Posts:
    121
    Just a heads up for everyone, SE bloom (and SESSAO for that matter) work just fine with ufps :)
     
    RB_lashman likes this.
  32. TwiiK

    TwiiK

    Joined:
    Oct 23, 2007
    Posts:
    1,729
    Seeing as Sonic Ether has the most fanatical following and that Ultimate Bloom seemingly has no forum thread I was curious if any of you have tried Ultimate Bloom?

    https://www.assetstore.unity3d.com/en/#!/content/31396

    This review in particular sparked my interest:
    Their/his tonemapping asset looks really good as well.
     
    Mauri likes this.
  33. Elecman

    Elecman

    Joined:
    May 5, 2011
    Posts:
    1,374
    I have that one also. It is pretty good but it requires a bit more fiddling due to its many settings. SE is just plug and play.
     
    RB_lashman likes this.
  34. Mauri

    Mauri

    Joined:
    Dec 9, 2010
    Posts:
    2,664
    Well... more Settings to play with means more possibilities, eh? :p
    @TwiiK Ultimate Bloom is a great Asset, but that's just my opinion ^^ Dunno about SNBDL as I don't own it. At least the Developer of Ultimate Bloom is more communicative...
     
    Last edited: Jun 19, 2015
  35. Elecman

    Elecman

    Joined:
    May 5, 2011
    Posts:
    1,374
    Very true.
     
  36. Mr-Stein

    Mr-Stein

    Joined:
    Dec 4, 2013
    Posts:
    169
    I think same, that very true
     
  37. thebroll

    thebroll

    Joined:
    Sep 26, 2014
    Posts:
    6
    Hello there,

    So have been using this fantastic asset for the last year. All has been great, since the update/conversion of our game to unity 5 we have noticed a glaring issue that the additive shader is not being effected by fog in the same way it was in unity 4. This is a huge deal for us and was wondering if you had any insight. Thanks in advance.
     
    Last edited: Jun 24, 2015
  38. Elecman

    Elecman

    Joined:
    May 5, 2011
    Posts:
    1,374
    I got the shader to work with fog. It is based on the build in Unity "Particle Add.shader" file, which you can get from the build-in shader download section.

    -Add this to the #pragma list:
    Code (CSharp):
    1. #pragma multi_compile_fog
    -Add this to the 2vf struct:
    Code (CSharp):
    1. UNITY_FOG_COORDS(1)
    Note that the number given must be a be a TEXCOORD which is not already is use. So if soft particles are used, it should be:
    Code (CSharp):
    1. UNITY_FOG_COORDS(2)
    This is because soft particles use TEXCOORD1.

    -In the vert function, add this just before return:
    Code (CSharp):
    1. UNITY_TRANSFER_FOG(o,o.vertex);
    -In the frag function, change this:
    Code (CSharp):
    1. return 2.0f * i.color * _TintColor * tex2D(_MainTex, i.texcoord) * (exp(_EmissionGain * 5.0f));
    into this:
    Code (CSharp):
    1. fixed4 col = 2.0f * i.color * _TintColor * tex2D(_MainTex, i.texcoord) * (exp(_EmissionGain * 5.0f));
    2. UNITY_APPLY_FOG_COLOR(i.fogCoord, col, fixed4(0,0,0,0));
    3. return col;
    Note that in all (semi) transparent objects are rendered using the Forward path (even if Deferred is set), so the fog only works with the forward fog (on the Lighting window). But if you use Deferred, all other shaders are only affected by Global Fog. So in that case, you need to use both Global and Forward fog together and tweak the parameters so it matches up.

    Also, when using HDR, all colors should really be half4, and not fixed4, but that is another story.
     
    Arkade likes this.
  39. clifton

    clifton

    Joined:
    Aug 5, 2012
    Posts:
    1
    Quick questions:
    • How is it going to look in gamma more? Is it much worse? are there any problems?
    • What are the best settings to use?
    Also it would be great to have a demo featuring a realistic environment.
     
  40. LeePerry

    LeePerry

    Joined:
    Aug 27, 2013
    Posts:
    7
    Hey there... I've been a huge fan of this plug in for a while now, and found it really easy to use. I work in VR on my DK2 often, and have used it for that a great deal as well (count me among the many who are DYING to get this dirt effect on world space materials like windshields)...

    When I went to Unity 5, and am using my Oculus, those cameras don't seem to work with the bloom effect anymore. The non-VR camera in the scene works just like it used to.

    Is anyone else using this in VR and found something under the hood breaking their use of it?


    (also, as a fan of Sonic Ether, I don't enjoy discussing competing products, but when some of you say the Ultimate Bloom dev is really responsive... where are you guys seeing that? I don't see any threads when I search that, and he doesn't seem to have his own forum for that plugin or something? I'd love to go ask that guy for more details about if Ultimate Bloom works well with VR, but I don't even see where I'd contact him.)
     
    Last edited: Jun 27, 2015
  41. timothyallan

    timothyallan

    Joined:
    May 22, 2013
    Posts:
    72
    I've just run into this as well. It works great in Play mode onscreen and on the DK2, but as soon as I export to a standalone exe, the bloom doesn't work, regardless of which quality setting I use.
     
  42. LeePerry

    LeePerry

    Joined:
    Aug 27, 2013
    Posts:
    7
    You're one step further than I am then, haha. I wasn't unable to get it in Play mode in VR either. I have a non-VR camera in that scene that works well, leading me to believe it is set up correctly, but yeah. Guess I might swap over to Ultimate and see if that's the norm now :/
     
  43. timothyallan

    timothyallan

    Joined:
    May 22, 2013
    Posts:
    72
    I'm using the new built in single VR camera setup that doesn't involve the dual OVR cam setup though, maybe give that a go if you're not too involved with the older version of the Oculus SDK?
     
  44. LeePerry

    LeePerry

    Joined:
    Aug 27, 2013
    Posts:
    7
    Yeah, great point. I should swap over to that, most definitely. I assume Oculus is maybe overwriting the HDR flag setting or something at run time.
     
  45. DivergenceOnline

    DivergenceOnline

    Joined:
    Apr 19, 2015
    Posts:
    244
    Still no word on the lens flares huh.
     
  46. mkgame

    mkgame

    Joined:
    Feb 24, 2014
    Posts:
    592
    Hi,

    probably a stupid question, could it simulate the front light of an RTS vehicle to avoid using light sources for this? (I dont need shadow.)

    Thanks for the answer!
     
  47. Elecman

    Elecman

    Joined:
    May 5, 2011
    Posts:
    1,374
  48. Manny Calavera

    Manny Calavera

    Joined:
    Oct 19, 2011
    Posts:
    205
    I can't believe this hasn't been fixed in over a year. After much fiddling, I've found a fix/workaround by changing the following two lines:

    Code (CSharp):
    1. //Tags { "RenderType"="Opaque" }
    2. Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" }
    Code (CSharp):
    1. // #pragma surface surf Lambert
    2. #pragma surface surf Lambert alpha:blend
    Also, the description says "works best with linear-color space" so I assumed I could still pull off something good enough in gamma but that doesn't seem to be the case.

    Has anyone been able to get a good bloom effect on a SpriteRenderer? I wrote a sprite shader (the asset doesn't come with one) based on the additive shader but the effect oversaturate the sprite details in linear space and doesn't bloom at all in gamma. :(
     
  49. SteelDragonBR

    SteelDragonBR

    Joined:
    Mar 24, 2015
    Posts:
    18
    Any deadline for Mobile Support ?
     
  50. Ceraph

    Ceraph

    Joined:
    May 16, 2013
    Posts:
    19
    Hello, I have been using SENBDL for a little while now and I have been super happy with the results. I have an interesting issue that I need some help on. In my game there is a white selection box that appears around objects the player's cursor is hovering over. Most of the time it looks fine; however, I also have a day/night cycle in the game and at night the white selection box is much brighter than the surrounding pixels, causing it to bloom quite a lot. Ideally I don't want this selection box (which is just a cube with a transparent cutout shader on it) to be affected by the bloom image effect at all, as I just want it to be a white box in all circumstances. I tried making another camera and using different layers, but in this setup the box gets rendered entirely in front of objects instead of around them. If anyone has any ideas on how to get this to work I would greatly appreciate your input.

    Thanks!
    ~ Ceraph