Search Unity

Lightbaking not working properly?

Discussion in 'Global Illumination' started by Lisspeed98, Feb 11, 2019.

  1. Lisspeed98

    Lisspeed98

    Joined:
    Nov 2, 2018
    Posts:
    4
    So I've been working on this level a lot lately and everything has been going fine besides one thing, the light bake. When all the lights are on the scene looks fine, the lighting looks fine, but once I light bake it the shadows (especially on the palm trees) become super dark and big. Also the entire scene starts to look a lot darker. I've checked all the models, all are static and all have the light bake option on. All the lights are on and set to baked as well.
    I've also put all the light-bake settings on, here are some screenshots:

    Before:


    After:

    See how the shadows also look very weird?
     
    Last edited: Feb 12, 2019
  2. Kuba

    Kuba

    Moderator

    Joined:
    Jan 13, 2009
    Posts:
    416
    Hey @Lisspeed98,

    Unfortunately your attachments are not showing up, I get "You do not have permission to view this page or perform this action.".
    Could you please check in the incognito mode in your browser? Then you can edit the post, reupload the attachments and recheck in incognito.

    Cheers,
    Kuba
     
  3. Lisspeed98

    Lisspeed98

    Joined:
    Nov 2, 2018
    Posts:
    4
    @Kuba Hey, I fixed the images now, they should be able to show up! :)
     
  4. Kuba

    Kuba

    Moderator

    Joined:
    Jan 13, 2009
    Posts:
    416
    Thanks!

    The overall darkness of the result is most likely caused by a limited range that is available when using lightmaps on mobile. Please see the dLDR description in here: https://docs.unity3d.com/Manual/Lightmaps-TechnicalInformation.html.
    One way to circumvent this would be to lower the intensity of the light and raise the albedo values of your textures.

    As for the black parts on the palms, they are most likely caused by incorrect lightmapping UVs. Please check out https://docs.unity3d.com/Manual/LightingGiUvs-GeneratingLightmappingUVs.html to resolve your issue.

    Cheers,
    Kuba
     
  5. Lisspeed98

    Lisspeed98

    Joined:
    Nov 2, 2018
    Posts:
    4
    @Kuba Hey, I managed to fix the colours which is a good thing but even after looking at the explanation for the black edges I still can't seem to fix it. If only it seems that, the more I play around with the Hard Angle and Pack Margin options, the worse I make it. It seems to become more apparent at other parts of the level as well, like the barrels, pillars, bridges and other things for example. I tried to put the Pack Margin on the highest possible number but that doesn't seem to help much either. Any ideas?
     
  6. kristijonas_unity

    kristijonas_unity

    Unity Technologies

    Joined:
    Feb 8, 2018
    Posts:
    1,080
    As @Kuba had already pointed out, you are most likely experiencing issues related to UV overlaps. Automatically generated UVs should work in most cases, but sometimes, you might have to author your lightmap UVs yourself in a 3D package.

    You can try using Texel Validity and UV Overlap scene view modes to verify this.
     
  7. Lisspeed98

    Lisspeed98

    Joined:
    Nov 2, 2018
    Posts:
    4
    @kristijonas_unity Ahh alright, I think it's very much possible that this is the case, but what is the best way to fix this then? I'm sorry, I'm relatively new to Unity and while I can manage to do a lot already, this is still a bit difficult for me.
    So if I were to Author them myself in a 3D package, how do I do this?
     
  8. KEngelstoft

    KEngelstoft

    Unity Technologies

    Joined:
    Aug 13, 2013
    Posts:
    1,366