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

Why realtime lights are getting baked?

Discussion in 'General Graphics' started by Polkatuba, Mar 8, 2015.

  1. Polkatuba

    Polkatuba

    Joined:
    Oct 31, 2014
    Posts:
    79
    Greetings,

    I'm testing Unity 5 and noticed that lights which are marked as "realtime" are still getting baked when building lightmaps. I don't understand the logic behind this. This practically defeats the purpose of having a choice between baked and real time lighting.

    Does anyone know if this is this an user error, bug or a "feature"?
    Unity 4 worked correctly in this regards.

    Thank you
     
  2. Polkatuba

    Polkatuba

    Joined:
    Oct 31, 2014
    Posts:
    79
    Ok, in case somebody else is bothered about this, the solution is to set "bounce intensity" to 0 for real time lights.
     
  3. Korno

    Korno

    Joined:
    Oct 26, 2014
    Posts:
    518
    If you do that then enlighten wont be activated for that light. You do know the "baking" you are talking about is just the precomputed stuff that enlighten does. The light is still realtime for casting shadows and affecting dynamic objects.
     
  4. Zomby138

    Zomby138

    Joined:
    Nov 3, 2009
    Posts:
    659
    ... and being moved or changing it's colour/intensity.
     
  5. Polkatuba

    Polkatuba

    Joined:
    Oct 31, 2014
    Posts:
    79
    Yes, so it seems.

    I didn't want to open a new thread for this, but... could you please tell me how do I get spot lights to have a shadow on a terrain?

    I have tried:

    - setting rendering mode deferred.
    - trying to chage a terrain material for my terrain (makes no diffence).

    What ever I do, I see only directional light shadows on terrain.
    Is this feature not supported in Unity 5? I find vitually no results with search.

    Thanks
     
  6. KEngelstoft

    KEngelstoft

    Unity Technologies

    Joined:
    Aug 13, 2013
    Posts:
    1,366
    Is your terrain lightmap static? If it is, it will not receive the realtime shadow from the spot light.
     
  7. Polkatuba

    Polkatuba

    Joined:
    Oct 31, 2014
    Posts:
    79
    Thanks for reply!

    I just tried non-static. Still no shadows on terrain. Should I submit a bug report?
     
  8. yuanxing_cai

    yuanxing_cai

    Unity Technologies

    Joined:
    Sep 26, 2014
    Posts:
    335
    It's a known issue. Please see this post.
     
  9. glennpow

    glennpow

    Joined:
    Jan 30, 2012
    Posts:
    56
    I would just like to address the original topic of this thread, since I am seeing the exact same problem and it seems to clearly be a Unity bug. You should NOT have to set the bounce intensity of a realtime light to zero in order for it to be omitted from the baked lightmaps. That is entirely the concept of setting a light to "Realtime" mode. What is the point of having this mode if it is effectively ignored (I do see that the shadows are still generated in realtime, but the cast light (intensity + color + position) is still baked into the lightmaps. The only solution I've found is to disable these lights during manual bakes, but this is also a Hack.
    @yuanxing_cai can you please address this issue?