Search Unity

Enlighten causing severe banding in Lightmaps

Discussion in 'Global Illumination' started by Migueljb, Feb 13, 2017.

  1. Migueljb

    Migueljb

    Joined:
    Feb 27, 2008
    Posts:
    562
    Someone please tell me there is a fix to this ugly banding artifacts or whatever there called. The scene is being viewed in Baked mode. I'm calling them UNITY please stop doing this to us problems.

    Im using 5.5.1p2. I only have 1 2048x2048 lightmap in this scene and the lightmap is uncompressed. Also here are my lightmap settings. I've tried using final gather at extremely large settings, nothing changed there. Tried so many things and settings nothing they never leave are always there. I can't be the only one frustrated with this problem hopefully unity or someone has a hack or fix for this.

    -Miguel UnityEnlightenLightmappingProbs.jpg UnityEnlightenLightmapSettings.jpg
     
  2. Migueljb

    Migueljb

    Joined:
    Feb 27, 2008
    Posts:
    562
    Seriously nobody has this problem? Unity lighting must be amazing then and I just don't know what I'm doing. Atleast if someone from Unity would say hey we know about this and its fixed in so and so version would be great!!
     
  3. jldevoy

    jldevoy

    Joined:
    May 2, 2014
    Posts:
    33
    you say you have compression off, thats been the main cause of it for me.
     
  4. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,717
    Are you using HDR?

    It usually happens in darker areas, can you perhaps tonemap differently?

    If you are using the new post fx stack, there's a version somewhere with dithering that will probably help.

    You can also do your own dithering in the shader, but that may be too much work, depending on how you have things set up.
     
  5. Migueljb

    Migueljb

    Joined:
    Feb 27, 2008
    Posts:
    562
    You actually want compression off on the lightmap turning it on to be compressed looks twice as worse. Im not using any post fx or HDR just a directional light for lighting up the room for baked only lighting if you take a look at my settings. Im using the Forward renderer.

    Also this is for Android not sure if that has anything to do with this problem in the lightmap. I don't see why baking on PC standalone compared to baking in Android mode in the build settings would matter tho does it?
     
  6. Owers

    Owers

    Joined:
    Jul 7, 2012
    Posts:
    39
    There's actually nothing wrong with the lightmap, the Baked view mode in Unity is just screwed up and displaying the lightmap incorrectly. The darker colours are being stretched, while the brighter colours are being squeezed, probably because the lightmap is not being decoded correctly by the Baked view, which results in banding in the indirect lighting and brighter, blown-out colours in the direct lighting. I noticed the Baked view mode broke when Unity 5.5 was released, but it seems fixed in the 5.6 beta, so maybe duplicate the project and test it in 5.6. It's annoying, because it makes viewing and adjusting lightmaps a bit of a hassle, but your lightmaps should be fine if you view them in Shaded view mode.
     
  7. Migueljb

    Migueljb

    Joined:
    Feb 27, 2008
    Posts:
    562
    It still shows in the lightmap. I can zoom into the texture in PhotoShop and see the banding inside the actual lightmap texture. I'm making a level for gear vr with my samsung S6 and that banding still shows up like that. So its an Android build and I don't have any texture compression on either for the lightmap or textures. With textures it helps lessen the banding but still very noticeable when in the gear walking up to the walls.
     
  8. BoBo-san

    BoBo-san

    Joined:
    Jan 29, 2011
    Posts:
    11
    Are you by any chance using Mobile-Lightmap-Unlit.shader?

    In case, if it's the same bug, Try change your Lightmap texture's type to default. This is just to verify, not fixing the bug.
     
    Last edited: Feb 17, 2017
  9. Migueljb

    Migueljb

    Joined:
    Feb 27, 2008
    Posts:
    562
    I'm using Legacy Shaders>Diffuse for all not using any mobile shaders at all or Standard shaders either. Changing it to default seems to half the banding not to bad but still noticeable. On dirty scenes with textures you dont notice this stuff its only clean scenes with solid colors is when you see this banding.
     
  10. nindim

    nindim

    Joined:
    Jan 22, 2013
    Posts:
    130
  11. BoBo-san

    BoBo-san

    Joined:
    Jan 29, 2011
    Posts:
    11
    The Legacy Shader/Diffuse use same decoding as surface shader. So, this is not same bug in Mobile/Unlit (Support Lightmap).

    Base on nindim's bug finding.

    If it's en/decoding bug, your scene shouldn't has any artifact if you switch to standalone platform or make standalone build. At very least, artifact should be less visible as lightmap with texture type default.

    This is my guess, I suspect that indirect light calculation combining with en/decoding bug causing the banding. Try reduce indirect resolution.
     
    Last edited: Feb 18, 2017
  12. Migueljb

    Migueljb

    Joined:
    Feb 27, 2008
    Posts:
    562
    So unity's encoding for android lightmap textures is different then on pc standalone. That makes sense but we should get the option not be forced into this. I mean how can unity think that this looks good on mobile for baked lighting. Then again this is Enlighten which there trying to get away from for all baked lighting. Hopefully all this gets fixed with 5.6 with there new progressive lightmapper for all platforms that just want baked lighting. *Sigh* I feel like only thing I see unity guys saying now is either its a bug or it's being worked on. Guess ill wait like everyone else see what happens with the new stuff.
     
  13. Anne_Lanting

    Anne_Lanting

    Joined:
    Dec 12, 2016
    Posts:
    25
    Hi there,

    Did you fix this problem, because i'm still having this problem in 5.6.0.f3 and 2017.1.1f. In the 'pc platform' everything looks great but when change to android the banding appears.

    Let me no, thanks.

    Great, Anne
     
  14. MartinNewMoon

    MartinNewMoon

    Joined:
    Jul 17, 2017
    Posts:
    1
    On Android, Unity 2017.2.0f3, seeing really ugly banding when using Baked Indirect. Switching to Subtractive lighting mode removes the artifacts completely.
     
  15. nindim

    nindim

    Joined:
    Jan 22, 2013
    Posts:
    130
    Hey MartinNewMoon,

    If you haven't already, you should submit a bug for this from the latest version of Unity. It might actually get fixed then! :)
     
  16. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Yeah, Unity staff don't really have time for forums but bug reports will work.
     
  17. Amin-

    Amin-

    Joined:
    Sep 27, 2017
    Posts:
    26
    Hi guys ..
    we also have same problem ! o_O


    PC platform :



    Switching to Android platform :






    Why we really don't see any BANDING issues in android games !? :confused:

    What do game developers do ?
     
    Last edited by a moderator: May 30, 2018
  18. Amin-

    Amin-

    Joined:
    Sep 27, 2017
    Posts:
    26
    it's very Necessary for us , please be responsive .
     
    Last edited: Jun 2, 2018
  19. JasonT4

    JasonT4

    Joined:
    Nov 19, 2018
    Posts:
    16
    Same problem here, and can't find the solution anywhere. Does anybody managed to fix this?
     
  20. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,717
    If your platform is mobile it's somewhat expected to get some banding, since lightmaps are encoded in dLDR (although there are changes for that in 2019.1).

    If you have issues in a non mobile platform, start a new thread maybe, with some images of the banding and some settings, so we can suggest things.
     
    Salvador-Romero likes this.
  21. KEngelstoft

    KEngelstoft

    Unity Technologies

    Joined:
    Aug 13, 2013
    Posts:
    1,366
    Yes, @AcidArrow is right. If you can't live with the compression artifacts try uncompressed lightmaps but please note that GPU memory usage will be higher.
     
    Salvador-Romero likes this.
  22. Salvador-Romero

    Salvador-Romero

    Joined:
    Jan 21, 2014
    Posts:
    54
    darkesco likes this.