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

Unity 5 Lighting and Standard Shader not working on mobile

Discussion in 'Editor & General Support' started by sowatnow, Mar 14, 2015.

  1. sowatnow

    sowatnow

    Joined:
    Jun 12, 2014
    Posts:
    309
    Hi guys,

    Unity 5 lighting and standard shader is giving me some hard time.

    I have continuous baking on, when its done, the whole scene loses its lighting. I also tried to do a single baking.

    I have played around GI setting etc, but no luck.

    Is there any proper guide for setting up the lighting?

    Secondly, I am using standard shader for mobile as well, I read somewhere that it works on multiplatforms.
    However, seems like it doesn't work on mobile.
    In Unity editor the normal maps and detail map works properly as shown below in picture 1. However, when I create an android built, the lighting effects and shader effects disappears as shown below in picture 2. ingame map.jpg Screenshot_2015-03-14-16-43-55.png

    Has anyone faced same issue? or know a solution?
     
  2. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    the "lightmap is ditched after baking" seems to be cropping up on 3 posts on the front page alone on 3 platforms.
    here PC http://forum.unity3d.com/threads/scenes-become-dark-when-i-switch.310475/ and WebGl http://forum.unity3d.com/threads/baked-lightmap-not-being-used.307138/ and now Android (you) so think its safe to say "not alone" on that one,

    I do build for android but haven't yet tested a baked lightmap into the standard shader, so, sorry no haven't checked this yet. However when I do I will head back over. (in the absence of previous input)
     
  3. sowatnow

    sowatnow

    Joined:
    Jun 12, 2014
    Posts:
    309
    Ya the problem still exists, there is something wrong with unity 5 lighting.
     
  4. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    okay. so its something to do with the Ambient light setting? L3fty pointed me at "a" right answer the other day and I forgot to push it on here.

    L3fty: "bug-reported similar behaviour a week or so ago, and was told it was a duplicate of a known issue. For me it only happens in editor play mode, doing a pc or mac build and the lighting does not break between scene changes.

    It appears that the ambient light from the sky-box simply breaks and stays black upon scene change. I was able to make it look nicer by changing to gradient ambient source and setting some lighter values at runtime.

    (Those settings are in Window->Lighting and under the environment lighting section)

    Fingers crossed they fix it when they patch :)"
    Whilst this may not be your actual problem it is something to be aware of.
    Perhaps they will pickup a few of your other points in the next patch too. Here's hoping.