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

Unity 5.5 lighting and shadow problems

Discussion in 'General Graphics' started by mathiassoeholm, Dec 3, 2016.

  1. mathiassoeholm

    mathiassoeholm

    Joined:
    Jul 20, 2010
    Posts:
    104
    After upgrading to Unity 5.5 our lighting got pretty messed up.
    The scene appears almost unlit, and dynamic shadows are rendering through the floor and other static objects.

    We have a single directional light in the scene, which is set to mixed.
    I have tried rebaking lightmaps, but the scene remains the same.

    Any ideas? :)

    Here's some screenshots that show the difference:




     
  2. mathiassoeholm

    mathiassoeholm

    Joined:
    Jul 20, 2010
    Posts:
    104
    I've submitted a bug report, reproducing the shadows problem. Notice that the cubes shadow is rendered on both floors. This only happens in Unity 5.5.

     
    Last edited: Dec 3, 2016
    OneManBandGames and Deleted User like this.
  3. Deleted User

    Deleted User

    Guest

  4. Deleted User

    Deleted User

    Guest

    try to change the directional light away from mixed, as its a buggy mess
     
  5. KyleStank

    KyleStank

    Joined:
    Feb 9, 2014
    Posts:
    204
    I had 3 directional lights turned to max intensity, and ambient light was at max as well, and I clicked "Build", and my scene seems unlit. Looks at this:



    That is with MAX intensity. Worked fine in 5.4, not 5.5. My team member is also having trouble. What the hell happened?
     
    Ximo-Catala and Deleted User like this.
  6. Ximo-Catala

    Ximo-Catala

    Joined:
    Jul 22, 2014
    Posts:
    34
    I'm having problems too with lighting since I upgraded to 5.5 this morning, as light intensity values have little or nothing to do with what you get once lightmap is baked. As a result, the full process of lighting is unpredictible ..

    In my case I'm working on fully directional-specular lightmapped maps on IOS environment. WIth previous 5.4* versions lighting worked sweet and accurate, however now everything looks a disaster: everything looks dimmer and flat, metallic&smoothness maps are barely visible... a total mess
    After doing some tests I really don't know what to do to get back to the same visual quality than before..
    Sin título-2.jpg
     

    Attached Files:

  7. kilik128

    kilik128

    Joined:
    Jul 15, 2013
    Posts:
    909
    what's happen ? !!!!
     
  8. Deleted User

    Deleted User

    Guest

    Unity happened....
     
  9. ilmario

    ilmario

    Joined:
    Feb 16, 2015
    Posts:
    70
    Same for me, after upgrading from 5.3.x.

    After upgrading to 5.5 and rebuilding lightmap, scene seems almost unlit (though not entirely). I had one baked light and one realtime light, both using mostly different layers in their culling mask (no lights set as mixed).

    Realtime light at least seem to work more or less, so I assume this has to do with baked lightmaps and illumination.
     
  10. OneManBandGames

    OneManBandGames

    Joined:
    Dec 7, 2014
    Posts:
    207
    I also have issues with lighting since upgrading from 5.3.x to 5.5: I use a terrain with one directional light and ambient lighting to simulate a day and night cycle. Since the upgrade I have the problem that the directional light seems to be weaker and is barely throwing shadows when ambient lighting is enabled as well. The result is that the whole scene lacks depth since the shadows are barely visible anymore, similar to the last two screenshots mathiassoeholm posted above. When using only directional lighting the whole scene seems to dark in total. I can of course increase the intensity of the directional light but this results in ugly, unrealistic high-contrast lighting.
    I tried to achieve the same lighting quality as before by tweaking values but no good result so far, will let you know if I find anything else.
     
  11. kilik128

    kilik128

    Joined:
    Jul 15, 2013
    Posts:
    909
    read somewhere you can put lightmap texture import setting to default texture type
    but after try result is burrned on mobile !
     
  12. OneManBandGames

    OneManBandGames

    Joined:
    Dec 7, 2014
    Posts:
    207
    I noticed that my issue with terrain lighting seems to be connected with normal mapped terrain textures. Here is a screenshot of the issue like I experience it:


    A directional light is illuminating this terrain directly from above, notice the missing shadows below the trees.

    Same scene with normal maps removed from the terrain textures:



    Scene is much brighter now, shadows are clearly visible on the terrain. I did have normal maps enabled in 5.3. and it certainly did not show this issue.
    I have been playing around with the normal maps since I noticed this, but I still can't 100% put my finger on what is wrong exactly. It seems that something is off with the way normal mapped terrain textures seem to recieve light, when the light is directly on top coming in at a 90 degree angle they seem to be displayed darker than when the light is coming in in a smaller angle.

    Not sure if we all experience the same issue here, but maybe it is worth if you do a quick check and remove some normal maps from your scenes if you have any to see if it makes a difference for you.
     
  13. OneManBandGames

    OneManBandGames

    Joined:
    Dec 7, 2014
    Posts:
    207
    another update: the terrain normal map textures where not set to TextureType = Normal Map in the import settings, doing so resolved my problem now. Not sure why this did not affect me in 5.3 or if this was something that happened during the automatic migration processes when opening the project the first time with 5.5.