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

Unity 5 Global Illumination doesn't work in runtime?

Discussion in 'Unity 5 Pre-order Beta' started by smerf123, Mar 2, 2015.

  1. smerf123

    smerf123

    Joined:
    Aug 26, 2011
    Posts:
    102
    GI looks gorgeous in unity, but when I hit the play button and mess around with the rotation of the light, the floor mesh does not look like as it would in the editor when not playing.
    Examples.

    In editor. notice the floor plane.

    In editor. Moved the light to get darker slightly. Notice the floor plane.


    Now at runtime, Light has the exact same position as the first picture.

    Runtime, but same position as the second image.

    Look at the floor, it is the exact same as picture 3 which it shouldnt. It should look like picture 2 but in runtime.

    Am I missing something? Does Global illumination not work in runtime? or am I not doing something?
     
  2. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    You should make the ground plane static, and set the light to realtime. In addition, you should open a new Lighting window from the window menu category and dock it to your inspector.

    Adding a reflection probe is the icing on the cake too.

    Happy GI!
     
  3. smerf123

    smerf123

    Joined:
    Aug 26, 2011
    Posts:
    102
    Thanks for the reply but I cant seem to get it to work properly.
    Is there a step by step on this perhaps? I kinda just went in blind and a little confused.

    I have tried to find one but I've not been able to
     
  4. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    what gi did you expect from a plane?
     
  5. Luckymouse

    Luckymouse

    Joined:
    Jan 31, 2010
    Posts:
    484
    I'm wondering exactly the same thing.

    @smerf123
    How could you tell there has GI if there has just a single plane in the scene.
    GI means the light bounces from one surface to others as indirect lighting.
     
  6. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    If he's thinking about reflecting the sky then he should add a reflection probe and look at the docs.
     
  7. smerf123

    smerf123

    Joined:
    Aug 26, 2011
    Posts:
    102
    I tried with multiple objects since your reply

    The skybox, I was trying to get the skybox's light on the plane (Not reflection)
    As you can see that worked in picture 1 and 2 in editor. just not in runtime even with the ground plane static.
     
  8. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Did you try viking village demo to test settings? it is on the asset store for your download.
     
  9. Luckymouse

    Luckymouse

    Joined:
    Jan 31, 2010
    Posts:
    484
    As far as I can tell, you are right that the skybox ambient won't update in runtime. Maybe it just meant be static during runtime for performance reason.
    You can try to add the "Light probe group" to the scene. I think it helps for update the ambient in the "play" mode.

    However I think skybox ambient is still not updated as expected after "Build".
    Not sure if it will change in future.
    Right now i use the ambient gradient instead for update the ambient with my webplayer build.