Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  3. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Is light mapping broken in 5.5.0b10 of iOS

Discussion in '5.5 Beta' started by Griffo, Nov 8, 2016.

  1. Griffo

    Griffo

    Joined:
    Jul 5, 2011
    Posts:
    700
    Hi,
    I'm having a problem with baking the light in a scene, I setup the scene to how I think it's going to look then when its baked the result it very dark.

    I've attached pictures of before and after the bake and the light and global settings.

    Have I missed something?

    iOS
    Unity 5.5.0b10

    Screen Shot_00.jpg Screen Shot_01.jpg Screen Shot_02.jpg Screen Shot_03.jpg Screen Shot_04.jpg
     
  2. kemalakay

    kemalakay

    Unity Technologies

    Joined:
    Jul 12, 2016
    Posts:
    224

    Hey @Griffo,

    This issue could be related to many things. Are you using legacy shaders for your object? Have you upgraded from 5.4, or have you created the scene in 5.5 from scratch? How about the results in editor? Do you see a different output in the editor than iOS? And even though it's not very important, I also see that you're using a gray color for your directional light. Have you tried maybe to make it brighter?

    Please provide more information about your scene so we can evaluate it correctly. Thanks!
     
  3. Griffo

    Griffo

    Joined:
    Jul 5, 2011
    Posts:
    700
    Hi @kemalakay

    I'm using Unity 5 standard shader.
    I've upgraded through all the 5.5.xx.
    This is a scene created from scratch as I was having this problem in my project.
    I'm building for iOS but this is in the editor.

    I changed the build setting to PC and Mac, set the ambient colour to white and the directional light colour to white, below is the before and after screen shots, and the shader settings.

    Still a big difference in the directional lights intensity, washing out the point lights before light mapping making it hard to set the lighting correctly.

    I thought what I'd see before light mapping is what I'd get after light mapping?

    Thanks for the input.

    Screen Shot_00.jpg Screen Shot_01.jpg Screen Shot_02.jpg
     
  4. Griffo

    Griffo

    Joined:
    Jul 5, 2011
    Posts:
    700
    Hi @kemalakay

    Set build setting back to iOS, same settings as above.

    Before and after.

    Screen Shot_00.jpg Screen Shot_01.jpg
     
  5. kemalakay

    kemalakay

    Unity Technologies

    Joined:
    Jul 12, 2016
    Posts:
    224
    Hey @Griffo,

    Well, then it's definitely related to your lighting settings. It's not expected to see the same result after building the lighting. What you see before you build the light is just a rough lighting. When you bake the lights, global illumination (bounce lighting) is applied, therefore it is expected to have a different result. Please check the documentation pages for more information about GI concepts.

    However, as far as I understand, you get a different visual output when you switch from Windows/Mac to iOS in build settings, even in the editor? And in your first post, the first two images you shared are the results from editor, right? If this is the case, then there is obviously something wrong. Can you maybe check your color space and rendering path settings? Since we currently have known issues with gamma mode, can you ensure that you're in Linear color space?

    This should not be necessary, but as a last resort, you can try to clear your GI Cache from Preferences. If this does not help, please let me know and we'll investigate it more.
     
  6. Griffo

    Griffo

    Joined:
    Jul 5, 2011
    Posts:
    700
    Hi @kemalakay

    Yes switching from Windows/Mac to iOS in build settings was in the editor.

    And yes the first two images I shared are the results from editor.

    My colour space was set to Gamma mode, my new settings are below with the before and after screen shots, I also cleared the GI Cache.

    A lot better ..

    Screen Shot_00.jpg Screen Shot_01.jpg Screen Shot_02.jpg
     
  7. kemalakay

    kemalakay

    Unity Technologies

    Joined:
    Jul 12, 2016
    Posts:
    224
    Hey @Griffo,

    I think it's now fair to say that the lightmapper is rendering the output as intended :) I hope this resolves your issue. Feel free to ask if you encounter other issues.

    Good luck with your project!
     
  8. Griffo

    Griffo

    Joined:
    Jul 5, 2011
    Posts:
    700
    Hi @kemalakay

    Yes, the results with linear colour space are very good, but I'll keep an eye on Unity fixing the problem with gamma mode as I believe older mobile devices don't use linear colour space.

    Thanks again for your help, much appreciated.