Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Baked lightmaps are getting corrupt

Discussion in 'General Graphics' started by vintagegameboy, Nov 24, 2015.

  1. vintagegameboy

    vintagegameboy

    Joined:
    Nov 18, 2013
    Posts:
    5
  2. vintagegameboy

    vintagegameboy

    Joined:
    Nov 18, 2013
    Posts:
    5
    Can someone please move it to support forum.
     
  3. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,328
    Ah. I had exactly the same problem with the same asset.

    For every fbx mesh you need to mark "generate lightmap uvs" in mesh import settings. That'll fix the issue.

    The problem happens because those objects have overlapping UVs. A lot of them.

    Keep in mind, that automatic lightmap generation can hang on some objects. It won't happen in this asset, but can happen somewhere else.
     
    vintagegameboy and AcidArrow like this.
  4. vintagegameboy

    vintagegameboy

    Joined:
    Nov 18, 2013
    Posts:
    5
    Thanks neginfinity.

    I tried your solution and it fixed the corruption issue, but now the its not generating a proper lightmap.
    What should I do?

     
  5. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,328
    By default that scene (it is created for unity 4) uses legacy shaders and has WAAAAY too many point lights. So, what you see is pretty much the "proper" lightmap.

    I'd recommend to start disabling the point lights. Basically, just turn them all off, and keep only outside directional light that simulates the sun active, see if it makes the difference. Also, check shadow casting flags on all the lights and geometry. I think that window glass is configured to cast shadows by default, and blocks lights entirely.

    In my case I also converted everything to unity standard shader, but it is incredibly time consuming, so I wouldn't recommend doing that.
     
    vintagegameboy likes this.
  6. vintagegameboy

    vintagegameboy

    Joined:
    Nov 18, 2013
    Posts:
    5
    Thanks
    Finally your solution worked. Converted everything to standard shader.
     
  7. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    This is the right place for the post.
     
    vintagegameboy likes this.