Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Realistic Day-cycle (real-time day to baked lights at night)

Discussion in 'Global Illumination' started by WildStyle69, Sep 21, 2017.

  1. WildStyle69

    WildStyle69

    Joined:
    Jul 20, 2016
    Posts:
    318
    Hi folks -- as per the thread title, trying to understand the best way to setup a realistic day-cycle that uses a single real-time light (sun) in the day and then at night additional baked / mixed lighting becomes active.

    I do already have a working solution that basically switches the lightmaps, so when the sun sets and the night comes I switch the lightmaps and then enable the baked lighting.

    There are a couple problems with this solution:
    1. Performance - there is a noticeable performance hitch when changing maps, as that's a lot of data to process / change.
    2. The light transition change is sudden, it would have to be a smooth / gradual change to looks effective I suppose.
    Has anyone done this before or have any pointers for a decent solution, one that would perform well?

    Thanks!

    // WildStyle
     
  2. WildStyle69

    WildStyle69

    Joined:
    Jul 20, 2016
    Posts:
    318
    This seems like a fairly usual thing to try and do, with a semi-realistic game that has a day / night cycle. Am I missing something here, i.e. it's already easy to do this? Or is it the other way, like not possible at all?

    Any takers? :)