Search Unity

Lightmaps showing errors after import over source control (Git)

Discussion in 'Global Illumination' started by KDurzy, Mar 13, 2016.

  1. KDurzy

    KDurzy

    Joined:
    Feb 2, 2015
    Posts:
    24
    I keep running into this problem in multiple (3) projects now; I lightmap a scene and push it to our Source Control (Git in this case), my teammates download the new scene and lightmaps and find that they do not look the same. The issue seems to be that a few of the maps, here and there, are just a bit off, as if moved slightly on the X or Y, causing black edges and splotches on some meshes. It is not only a function of my machine to another machine, it is happening regardless of who in our team builds the lightmaps; everyone else sees a broken result.
    On the last project I had worked on we solved this by upgrading to 5.3.3p1. After we all moved to that version we stopped seeing this problem. On the current project, upgrading to this version (from 5.3.2p2), did not fix this issue.
    I had run tests before by creating new projects and building lightmaps for cubes and pushing/pulling them. That is how we arrived at 5.3.3p1 before. Now, I do not have the time to be running tests for days to try to figure this out.
    I have posted about this before to no avail (http://forum.unity3d.com/threads/li...itting-to-source-control.374657/#post-2429381). Again I implore for help; has anyone seen problems like this on the Unity side and can offer up a solution or at least point me towards the possible culprit?? Are there some files that may not be getting sent across properly over Git?
     
    Last edited: Mar 14, 2016
  2. KDurzy

    KDurzy

    Joined:
    Feb 2, 2015
    Posts:
    24
    well, running some tests after all... again... :mad:
    New, blank scene with plane object and cube structure, 2 spotlights and the Skydome setup we have in the rest of the project (will do another test without the Dome if I have time later).
    Left side, my machine; all good. Right side, teammates machine, edges of cubes black because the lightmaps are shifted, or the cube UV coords are shifted.... something, somewhere is getting screwy, that's for sure.
     

    Attached Files:

  3. willgoldstone

    willgoldstone

    Unity Technologies

    Joined:
    Oct 2, 2006
    Posts:
    794
    Hi there,

    Have you got a bug report number I can refer to with our developers and support teams to try and assist you with this problem?
     
  4. Kuba

    Kuba

    Moderator

    Joined:
    Jan 13, 2009
    Posts:
    416
    The issue should have been fixed in Unity 5.3.1, so upgrading to this or a later version fixed the issue in your other projects as expected.

    As Will mentioned, it would be best if you submitted a bug report on the issue you have now and posted the case number here, so that we can figure out what's the difference between this case and the ones that we have fixed.
     
  5. KDurzy

    KDurzy

    Joined:
    Feb 2, 2015
    Posts:
    24
    Well, for anyone searching similar issues, and I will try to find the other thread I had posted on about this, it seems I have found the answer to this issue while testing every possible way to break the lightmaps after baking them on my machine.
    The way I can fix (and also break if reversed) the remote lightmaps is to;
    1. grab all of the _dir lightmaps (we are rendering in Directional Specular mode) in a scene
    2. set them to Advanced
    3. make sure the Bypass sRGB Sampling box is checked and Encode as RGBM is off

    It seems to me that this setting does not remain intact when the lightmaps are moved to another machine (by Git or manually even), at leas this was the case for us.
    The way to break any lightmap (as I mentioned above) and see the problems we had experienced is to select the _dir lightmaps and untick that Bypass sRGB Sampling box under the textures Advanced settings.
    We had been testing this on 5.3.4f1 by the way.

    Hope this helps anyone else experiencing something like this... make sure the settings on your lightmaps are correct, as they may not be getting imported properly, regardless of the settings you set (or did not).