Search Unity

Lightmap artifacts/dark spots in Unity 5

Discussion in 'General Graphics' started by Fer00m, Mar 5, 2015.

  1. Fer00m

    Fer00m

    Joined:
    Feb 28, 2014
    Posts:
    170
    Hey there,

    I'm having a problem with new lightmap baking system. My trees seem to shade incorrectly under canopy, resulting in some dark shapes, as shown on the image below. Is this supposed to be AO or are these artifacts?



    Tree bark shader is Mobile/Diffuse and branches are Transparent/Cutout/Diffuse.
    These are my lighting settings:
    http://i.imgur.com/eVVeI5E.jpg

    So if someone could enlighten me and say what's going on there and how to get rid of these artifacts I'd be grateful.
     
  2. ArchVizPRO

    ArchVizPRO

    Joined:
    Apr 27, 2014
    Posts:
    457
    i think the problem is directional specular.. try only directional
     
  3. Fer00m

    Fer00m

    Joined:
    Feb 28, 2014
    Posts:
    170
    Hey,
    I appreciate your answer! When I used Final Gathering, directional mode made no difference, however if I switch it off different kind of artifacts appear (image: http://i.imgur.com/TfgyogX.jpg) and that's where changing from directional specular to directional helped. Additionally I created separate attributes config for tree branches with Is Transparent set to true. Sadly this leaves me with another problem, as I can no longer use specular maps which I used on terrain. Is any workaround possible?
     
  4. Kuba

    Kuba

    Moderator

    Joined:
    Jan 13, 2009
    Posts:
    416
    We would really appreciate a bug report with that scene, so we can investigate issues you've been having.

    Do you mean if there's a way to have the specular component on objects lit only with baked lighting?
    If you're not using Directional Specular, then you can't have specular from the lighting that was baked into lightmaps. You can still however get specular from baked or realtime reflection probes (the default reflection of the skybox is always rendered, even if you don't have a reflection probe in the scene) and from realtime lights.
     
  5. den3d

    den3d

    Joined:
    Nov 23, 2014
    Posts:
    45
  6. Kuba

    Kuba

    Moderator

    Joined:
    Jan 13, 2009
    Posts:
    416
    Responded in the other thread. The issue above can indeed be related, but could be specific to Directional or Directional Specular mode. Fer00m, could you try the suggested solution and if it doesn't fix it, submit a bug report so we can take a look?