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. Dismiss Notice

Light not casting evenly on 5x5 floor tiles

Discussion in 'Global Illumination' started by infinitypbr, May 14, 2016.

  1. infinitypbr

    infinitypbr

    Joined:
    Nov 28, 2012
    Posts:
    3,149
    Hello!

    The ground here is made up of 5x5 planes. In the image, you can see how a point light placed above a seam will light them unevenly. Removing the light (bottom image), and the light is even. If I were to move the light further from the seam, they'll end up being even, while still being lit.

    This causes a problem for a point light that follows the player, for like a torch or something.

    Anyone know why this is happening, and how I might be able to fix it?

    Thanks!!

    light.jpg
     
  2. infinitypbr

    infinitypbr

    Joined:
    Nov 28, 2012
    Posts:
    3,149
    Another example...
    Screen Shot 2016-05-14 at 11.40.36 AM.png
     
  3. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,625
    I don't know if this is the right answer for you, but searching the forums I see the main recommendation is to increase the number of pixel lights under Project Settings > Quality.

    Another tip I picked up in the forums that might work is to be sure the texture is set to Repeat, not Clamp.
     
    Last edited: May 14, 2016
    infinitypbr likes this.
  4. infinitypbr

    infinitypbr

    Joined:
    Nov 28, 2012
    Posts:
    3,149
    Ah -- Project Settings > Quality | Pixel Lights was the culprit.

    Maybe someone who knows more can correct me if I'm wrong, but I gather that each pixel will only take into account "Pixel Lights" number of lights. It was set to 4, and I had three wall mounted lights, plus I'm assuming the ambient light counts as one as well.

    So each pixel will take into account the ambient and the 3 closes or most important or something lights. This is a good thing to know!
     
  5. infinitypbr

    infinitypbr

    Joined:
    Nov 28, 2012
    Posts:
    3,149
    There's still similar issues on a wall here. Upping the pixel light count to something insanely high doesn't fix it, and all the textures are set to "Repeat" as well.

    Any more ideas on other causes of this? :D

    Screen Shot 2016-05-14 at 1.59.13 PM.png
     
  6. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,625
    I don't know about that one. I'm suspicious of it being a corner, though. Could have something to do with it.
     
  7. infinitypbr

    infinitypbr

    Joined:
    Nov 28, 2012
    Posts:
    3,149
    Yeah, it's confusing. It's not the corner -- well, that could be part of it for all I know -- but it also happens on flat walls.
    (left of the light) Screen Shot 2016-05-14 at 2.58.18 PM.png
     
  8. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,625
  9. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,625
    It's possible that this is fixed in the new version of Unity: 5.3.5.

    Here's some of the improvements made to GI:

    • GI: Fixed incorrect normal mapping on Directional Specular lightmaps; shader code was not matching up what Enlighten was baking. (755421, 766533, 766546, 779696, 756020, 780025)
    • GI: Clamped DynamicGI.indirectScale to allowed range. (664953)
    • GI: Disabled LightProbeGroup components no longer display visualization in the scene view. (662572)
    • GI: Fixed errors when using baked lightmaps & multi-scene editing. (753822)
    • GI: Fixed realtime GI texture coordinates sometimes going wrong on static-batches meshes. (743273)
    • GI: Fixed some cases of scenes not referencing the correct lighting data asset after bake. (757575)
    • GI: Improved wording of various Enlighten error messages.
    • GI: Now properly initialize baked scenes in some code paths to avoid error on console. (753822)
    • GI: Upgraded to Enlighten3.02p4. Fixes direct lighting getting baked into lightmap (697565). Fixes a precision issue and out-of-bounds texture access in baking, which could lead to a crash in the Final Gather stage. (767110)
    • GI: Changing Reflection Probe component positioning in the inspector makes realtime probe black. (653592)
    • GI: Fixed a Reflection Probe baking issue when multiple scenes are used in a project.
    • GI: Fix for baking a scene with objects added before saving the scene not being included in the result. (728610)
    • GI: Fixed a crash when building reflection probe data on specific scenes containing Canvas elements. (767560, 763045)
     
    infinitypbr likes this.
  10. gaterooze

    gaterooze

    Joined:
    Jul 17, 2019
    Posts:
    16
    I had a similar issue and found that some of my models had imported with the "Mobile/Diffuse" shader selected - changing it to the standard shader fixed it.