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. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

Unity 5 lightmap artifacts?

Discussion in 'Editor & General Support' started by dshankar, May 4, 2015.

  1. dshankar

    dshankar

    Joined:
    Feb 28, 2015
    Posts:
    21
    Hello!

    Any idea what's causing such artifacts in some assets? It looks like a lightmap issue. Capture.JPG Capture2.JPG Capture3.JPG
     
    Last edited: May 4, 2015
    acaroppos likes this.
  2. dshankar

    dshankar

    Joined:
    Feb 28, 2015
    Posts:
    21
    Couple notes:
    I'm referring to two (possibly related) problems:

    1. The odd black bands on the roof of that building in picture #2
    2. The splotchy black pixely dots on some textures (the tent in picture #3, the wood panels in picture #2)

    For reference, the green ammo box in picture #3 is what the textures should all look like: no black dots!

    Important note:
    As I change the texel resolution in the light scene settings, the black dots either become larger blobs (with a lower texel res) or fine pin points (with a high 40+ texel per unit res). The dots, however, never disappear.

    Is this an issue with lightmapping? With the UVs?

    I've noticed that occasionally, on some bakes, even other objects like the green ammo crate get the black dots. Re-baking sometimes fixes the problem but this is recurring on certain objects.
     
  3. dshankar

    dshankar

    Joined:
    Feb 28, 2015
    Posts:
    21
    One more:
    The same artifacts are showing up on the terrain object. This area hasn't been painted, just uses one texture on the whole terrain. So this doesn't look like a UV or texture issue.

    Capture4.JPG
     
  4. Maffew

    Maffew

    Joined:
    Jan 22, 2014
    Posts:
    14
    I'm also having this problem, but mine seems much worse:



    I have given everything lightmap UV's in 3DS Max and then tried generating them in the Unity import when these didn't work
     
    acaroppos likes this.
  5. Tyrch

    Tyrch

    Joined:
    Mar 6, 2015
    Posts:
    6
    I have had the exact same issue, as it turned out...the way i fixed it was to select the mesh item in the project window and tick "generate lightmap UV's " tick box in the Inspector window. also i have normals and tangents set to import drop down for normals and calculate for the tangents drop down. under generate light map UVs there is drop down called advanced. you can play with these settings too. thi sis all under the assumption that you UV's are unwrapped nicely in teh second channel ( unity can and does do it but i find its better to do it manually in Max or Maya. if you have set up second uv channel to handle tiled textures then click the swap uvs tick box. otherwise leave it unticked.
     
  6. Sparrowfc

    Sparrowfc

    Joined:
    Jan 31, 2013
    Posts:
    100
  7. Kuba

    Kuba

    Unity Technologies

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

    Those issues seem to be caused by the UVs overlapping in the atlas. Please make sure you are providing proper non-overlapping lightmapping UV.

    In 5.2.0b4 we fixed an issue that caused one stray object (with UVs way outside of the 0-1 range) to overlap with other objects in the atlas. It's worth trying that or any subsequent release.

    Otherwise please go to the Lighting window and check the Preview at the bottom of the Object tab. The Baked Intensity mode allows you to inspect the UVs shown on top of the baked lightmaps, that should allow you to figure out what is wrong.
     
    hippocoder likes this.
  8. acaroppos

    acaroppos

    Joined:
    Jul 16, 2015
    Posts:
    31
    Thank you so much, that fixed the same problem for me!
     
  9. ConquerExperience

    ConquerExperience

    Joined:
    Dec 1, 2015
    Posts:
    4
    Thank you !! Tick on Generate Lightmap UVs fixed it.