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 Lighting.

Discussion in 'General Graphics' started by DavidHw, Mar 10, 2015.

  1. DavidHw

    DavidHw

    Joined:
    Mar 4, 2015
    Posts:
    8
    David1.jpg David2.jpg

    I have been trialing Unity for a couple of months prior to us buying a full license, all was going well until Unity 5. I converted a project from 4 to 5 and the results didn't quit live up to the expectations, so I started from scratch in Unity 5 re importing the original geometry from 3ds Max and applying the new Shaders to it all looked good to start with. The first image is part of my scene lite with the Global illumination and a directional light only set to real time, the second image is after I have clicked view in game mode and gone back to the editor view. If I turn the directional light off then there is no Global illumination in the scene anymore contributing to the overall lighting the screen goes black. The only way to get it to look correct again is to tell Unity scene new and drop my geometry back into the scene. Any help would be appreciated as I am beginning to give up on it and am thinking of going back to Unity 4.6. I have turned things on / off tried as many settings as I can and after three days I still get the problem even if I save the file shut Unity down and reopen it, I still lose the Global illumination in my scenes, also it will no longer publish to file with the Global illumination showing up. I am sure it's probably something simple but after going round in circles I have probably missed the obvious..:) I know if I try to bake any light-maps even a single Reflection Probe that will cause this effect in my scene, so all baking is turned off and all reflection probes deleted from the file.
     
  2. DavidHw

    DavidHw

    Joined:
    Mar 4, 2015
    Posts:
    8
    Got a bit further each scene has at least one Default Reflection Probe, the default one for my scene keeps forgetting it has a baked map for it, when it forgets the Global illumination gets lost and my scene goes dark. It seems to lose the map for that probe once I go in game mode no Idea why yet.
     
  3. Botanika

    Botanika

    Joined:
    Nov 2, 2013
    Posts:
    60
    Are the Game objects marked as static ?
    have you tried deleting any reflections probes you have in the scene ?
    Is the directional Light marked as realtime ?
    Is the directional Light bounce intensity superior to 1 ?
    Is the ambient source set to skybox ? (Like in the attached image)
    Is the reflection source set to skybox ? (Like in the attached image)
    Is the "Indirect Intensity" set to a value superior to 0 ? ( in the General GI tab )


    You really don't need any reflection probe to light this particular scene.
    but if for some reason you still need reflection probes, mark them as "baked", and build the lighting, or use "Continuous Baking"
     

    Attached Files:

    theANMATOR2b likes this.
  4. Polkatuba

    Polkatuba

    Joined:
    Oct 31, 2014
    Posts:
    79
    I have also noticed that light probes lose their effect when entering game mode and back. You have to re-bake to get them back. It's clearly a bug.
     
  5. Jonny-Roy

    Jonny-Roy

    Joined:
    May 29, 2013
    Posts:
    666
    If you think you've found a bug, report it, then you can say it's clearly a bug and post the bug number for all to see it's reported!
     
  6. DavidHw

    DavidHw

    Joined:
    Mar 4, 2015
    Posts:
    8
    Botanika yes the settings are correct I have checked them more than once thinking It must be a setting that's out but thanks for that suggestion. The scene has Reflection probes because it has a lot of Glass windows in it as well as the polished wheels on the wagons on the loading docks etc. that's not shown on the above screen shots as they contain customers Logos ( I don't make Games). I found a reflection probe I didn't know I had so deleted that one. Now when I clean the GI cache and tick Precomputed Realtime GI and hit Build all's fine, I get my GI and basic sky reflection's on reflective surfaces as I should. If I add one probe to the scene set it to baked and bake it then it shows the problem above, I Got round it by setting the probes I need to real time not baked so I can output a Demo. Not saying I have found a bug just having a problem when it comes to baking a reflection probe. Will try a simple scene when I get time to see if it's this file or what that causes the problem.
     
  7. Stardog

    Stardog

    Joined:
    Jun 28, 2010
    Posts:
    1,887
    I had an issue with reflective materials not updating. If you have Continuous Bake on, turn it off then on again.

    Also, you can get 4.x real-time graphics without going back to 4.x. In the Lighting panel, change Ambient Source to Color and uncheck Precomputed.
     
  8. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,672
    This doesn't sound like expected, please report a bug with simple project attached.

    Thank you
     
  9. KingArbinV

    KingArbinV

    Joined:
    Apr 29, 2014
    Posts:
    8
    What seemed to work for me is window>lighting scroll down to General GI and change Directional Mode to non Directional.. it gets the lighting back but not sure how good of a fix this is.