Search Unity

Realtime vs. Baked lighting inconsistent results

Discussion in 'Global Illumination' started by spryx, Mar 6, 2015.

  1. Stardog

    Stardog

    Joined:
    Jun 28, 2010
    Posts:
    1,913
    Absurd? You've obviously never mapped for Half-life, HL2/Source, Unreal Tournament, etc.

    Why is it an issue? Baked can do a million more calculations (because it's baked, not realtime), so it's bound to look different/better.
     
    Korno and Martin_H like this.
  2. spryx

    spryx

    Joined:
    Jul 23, 2013
    Posts:
    557
    @HalversonS I'm guessing it is more of a technical limitation at the current time. They are working on the issue. I believe a fix should be out by 5.3, but there is some hope that they may backport it.
     
  3. HalversonS

    HalversonS

    Joined:
    Jan 24, 2014
    Posts:
    28
    @spryx Yeah :( I wish they had kept a legacy mode like they have with animation. I had hopes it would be in this recent 5.2 update. The lack of input from the dev team on many other threads has me thinking it will be some time before it's addressed.

    @Stardog Yes. It is absurd. If you have hours and hours to play guesswork then good for you. However, I feel most people would rather use precise tools and get the job done sooner. Rather than just bluntly bashing my post can you contribute something helpful? Do you have any idea why lights that are excluded from a certain layer would still bake on a mesh? I've found one other thread where the user experienced this issue but it went unanswered. Maybe this was missed in the manual.. maybe I've missed where in the manual it may say layers are not affected.

    Also, some light maps are not changing how the mesh is rendered. I've set their range and intensity to levels I would not actually use but still no love. Is there a limit to the amount of light maps that will display in a scene? I can see the maps have been created but when applied there is no change to the mesh. (it is static)
     
    Last edited: Sep 23, 2015
  4. rapidrunner

    rapidrunner

    Joined:
    Jun 11, 2008
    Posts:
    944
    The light system is probably the most complex thing to wrap your head around.

    I did start to play with it and the results are totally random at times....it feels like you are playing Yatzee with the parameters, hoping that you get something of your liking.
    Outdoor scene are easier; you can see the intensity right away, and you can work around the bloom that you see, when the color start to wash away; but for the indoor scene, it is a lottery.

    I did all the variations that would make sense, reading the manual, and none of them came out as I wanted. On top of that; if you clean your baked maps, the result, without changing parameters, will be TOTALLY different from the one that you had before...talking of consistency, I do not understand how people are actually mastering this light system.

    So far, I did learn that Gamma is bad, since it increase exponentially, compared to linear; so +1 increases in linear equals to doubling the value in Gamma scale, for each step that you execute; so the blooming and burning of the lights on your textures, may be caused by that.

    Bounce also play a role in the whole picture; although you have 2 different bounce values: one from the light and one from the lighting settings; which is confusing. You set the light inside; all looks fine; then go outside and everything is too bright. Reduce the outdoor light settings and inside it is too dark...frustrating to be honest.

    I see UT focusing more on services; would be nice if we actually get some nice tutorials about the lighting system, where the setup are explained, so you can have an idea of what to set up for a specific mood, and experiment on it.
     
    spryx, DBar, HalversonS and 2 others like this.
  5. DBar

    DBar

    Joined:
    Jul 27, 2012
    Posts:
    71
    Hello,

    I need serious help baking my lightmaps for Android too.

    http://www.hungersnake.com/1.png

    I tried many hours. No way out of "no baked lighting in the phone".
     
  6. rapidrunner

    rapidrunner

    Joined:
    Jun 11, 2008
    Posts:
    944
    Your statement is quite vague...what is the issue? Which settings are you using? Are you aware of the limitation of the mobile platform, and the changes that you have to set in the light settings and light panel config?

    Just to be sure that you have the basics covered, before chasing ghosts. It is already hard to deal with lights in Unity, knowing that everything was set by the book as directed, so you can imagine how hard would it be to try to troubleshoot something without even knowing the initial state.

    Also you may want to open your own thread; it is easier to work in that way, without spam people on this thread for things that are mostly limited to your personal case.
     
  7. DBar

    DBar

    Joined:
    Jul 27, 2012
    Posts:
    71
    Hey,

    Yes, i have the basics covered.
    Sorry for spaming your post.
     
  8. Ramsdal

    Ramsdal

    Joined:
    Oct 18, 2013
    Posts:
    251
    Im on this boat as well, hope this gets some attention from Unity asap. :)
     
  9. rapidrunner

    rapidrunner

    Joined:
    Jun 11, 2008
    Posts:
    944
    No worries, you don't spam me; I get notifications on this post anyway ;)

    Are you still having issues? Feel free to refer the thread link if you opened one.
     
  10. frg_kova

    frg_kova

    Joined:
    Jul 16, 2015
    Posts:
    16
    I have a similar problem with my indoor scene. Baked GI doesn't look even close to realtime. Any ideas how to debug?
    The first image is realtime, the way it is supposed to look without any lightmaps. It's linear color space, no light probes.
    With non-directinol baked GI, the floor looks good, but I lose on specular and brightness of the light.
    With directional-specular, the light intensity is there, but the floor now is way to bright.
    This is only one spot baked light + one realtime directinal light that casts the shadow ond the floor (cookie texture is used so it cannot be baked)

     
  11. Ramsdal

    Ramsdal

    Joined:
    Oct 18, 2013
    Posts:
    251
    Yeah tell me about it, I have the same problem in my post where it is even more evident here. However as the good @spryx mentioned in my post, there is a place where you can vote for a fix, and that is here.
     
    spryx and rapidrunner like this.
  12. frg_kova

    frg_kova

    Joined:
    Jul 16, 2015
    Posts:
    16
    The bug says linear color space is ok, but I'm in linear color space and getting that. I still voted.
     
    spryx likes this.
  13. spryx

    spryx

    Joined:
    Jul 23, 2013
    Posts:
    557
    Wow, this thread has almost 10k views!

    @frg_kova Thanks for the vote. It looks as though linear space baking is a little more accurate than gamma space. The results are still not close enough to justify long baking times. I am not sure if the new progressive lightmapper will work on both gamma and linear, but I imagine that it would. In my initial tests gamma baking looks eerily similar to linear baking, despite gamma realtime appearing vastly different.

    You can kind of debug the scene by following the example from @KEngelstoft on the first page of this thread. (Scene>GI>Baked).

    I do know that there were 'under the hood' tweaks made to lights in the early days of U5 development. I suppose this may have something to do with the disparity we see here. My guess is that it was a this or that type of situation. PBR in favor of breaking baking.

    Your environment looks great by the way!

    Let's hope the new lightmapper comes soon. :)
     
    Last edited: May 2, 2016
    AcidArrow, kilik128 and ChayChay like this.
  14. Sarrivin

    Sarrivin

    Joined:
    Dec 18, 2015
    Posts:
    24
    Having the same issue. Extremely frustrating!
    And the voting is now closed, or "postponed". Hard to tell what's going on, and Unity is silent on the matter despite so many views.
    Please Unity Team, fix that issue. With a lot of light, it can take weeks to "predict" how lightning will bake.
    Yes, predict, there's no better word, because it's divination, not technique. So I consider it a heavy workflow breaking bug, I'm afraid.
    Just test any 3D Forge Interriors scene, The Crypt is a great example. It's simply too demanding when not baking lights, but after baking, results look silly and unusable.
     
  15. Ramsdal

    Ramsdal

    Joined:
    Oct 18, 2013
    Posts:
    251
    @Sarrivin i suspect this mainly happens in certain scenarios - because I experienced it myself but finally gave up on a fix - though I guess it is bound to come at some point.

    In my case I ended up with removing the graphics emulation and setting the colorspace to linear and graphics to gles3. However in many cases this will not work - and most likely not in my own either, but I am far from release so no big issue for me... YET!! :)

    Edit: same issue here (on android) https://forum.unity3d.com/threads/baked-lighting-on-android.429553/
     
  16. Sarrivin

    Sarrivin

    Joined:
    Dec 18, 2015
    Posts:
    24
    Yup. And you know, I've just opened another scene in _the same_ project. It's a pack from competition of 3D Forge, Manfactura K4. Top Down Interriors. And I've just baked it with probably the same settings...
    No issues here! In that pack, the same project, probably same lightning settings, baked lightning looks exactly like realtime lightning. So if Unity wants to reproduce the problem, they should download 3D Forge's Interriors Kit, for example.

    For me it's already a big issue I'm afraid. I've bought 3D Forge pack and probably wasted money, can't use it. Who would waste so much time trying to fix unpredictable lightning in the scenes where there's tens if not hundreds of lights. Especialy while baking takes about 20-60 minutes here. It's probably some kind of bug or "feature" that we know nothing of, but of major concert to me.
    I also had horrible looking shadows after baking Gaia, out of the box. Totally black spots on trees, ground, houses, etc.

    Maybe it's a problem with some particular materials/textures, who knows.
     
    Last edited: Nov 11, 2016
  17. lavi_mahal

    lavi_mahal

    Joined:
    Nov 30, 2016
    Posts:
    9
  18. hphillip21

    hphillip21

    Joined:
    Mar 30, 2017
    Posts:
    2
    Ok, so I have been having this problem and it is extreme. Once I bake, everything looks AWFUL. I did just make some improvements from reading and raising some of the settings up, but it is BAD.

    Is there an actual explanation in this thread, because I didn't think I actually read one? Is it a bug with baking specific to 5.x? Specific to Android?

    I'm doing a Udacity course and am using Unity 5.x and developing for Android, so if those are the criteria for running into this problem, then maybe I'll have to go back to Unity 4.

    I am fairly new to this, but my settings seem to be in line with what everyone has discussed above.

    PuzzlerNoBake1.PNG PuzzlerNoBake2.PNG PuzzlePostBakeExt.PNG PuzzlerPostBake1.PNG
     
  19. spryx

    spryx

    Joined:
    Jul 23, 2013
    Posts:
    557
    This is a disparity issue between gamma/linear real-time and baked lighting (see my first post). The progressive lightmapper is the solution. I suggest you read up on it if you are unfamiliar. It is a new experimental feature in Unity 5.6. My early tests with it yield promising results in a gamma mobile project.
     
    Ramsdal likes this.
  20. Stardog

    Stardog

    Joined:
    Jun 28, 2010
    Posts:
    1,913
    Did you set your individual lights to Baked?

    Use a smaller scene to learn baking.
     
  21. Hagen

    Hagen

    Joined:
    Aug 16, 2014
    Posts:
    36
    Ok, so this is open since 2015 and seems not to be in the roadmap at all to address.
    What are the alternatives if we do not want to use real time lightning? Just switch
    to linear color space? I have been literally wasting too much development time by iterating across different lightning settings and baking trying to get a good looking results similar to real time gamma lightning. I believe editing the light maps could potentially even require more time.
     
  22. rapidrunner

    rapidrunner

    Joined:
    Jun 11, 2008
    Posts:
    944
    I just realized that the issue is still there; tried the new illumination in 2.6 and I still get 2 different outcome, using realtime and baked.

    I guess there is no way out; it is easier for me to just re-design the scene with minimal realtime lights; instead than trying to get the light to match now.

    Disappointing that this has been going for so long, without a clear resolution from the Unity team.
     
    spike1, x4000, guru20 and 1 other person like this.
  23. rainboww

    rainboww

    Joined:
    Jan 5, 2017
    Posts:
    125



    For me lighting is REALLY frustrating, i feel the scenes do somehow look flat and not "real" Especially looking at that picture and lighting i tried out with unity i strongly feel that unity light does not mix. If you have yellow and red light overlapping you dont get orange in the middle you get a red area and a yellow area with a "line" between.

    A note this makes unity a not so professional engine in my mind. Are there plugins to fix that btw
     
  24. rainboww

    rainboww

    Joined:
    Jan 5, 2017
    Posts:
    125


    Well maybe i am wrong with the idea that it does not mix at all, but i feel it looks somehow off still, not to mention that the camera might cull light at a distance in a way it does not fade but disappear suddenly.
     
  25. spryx

    spryx

    Joined:
    Jul 23, 2013
    Posts:
    557
    @rainboww This is a really old thread.... and we already have a solution in the form of the Progressive Lightmapper. I would suggest you try it and see if it fixes your lighting issues. My original post had more to do with the inconsistencies between gamma and linear lighting and predictable lighting iteration when it comes to mobile platforms.
     
  26. stevenwanhk

    stevenwanhk

    Joined:
    Jul 20, 2016
    Posts:
    113
    I have already used progressive, but it still gives different results on one of the directional lights

     

    Attached Files: