playMaker

Author Topic: Swapping Scene Lightmap Bakes At Runtime? (Day/Night)  (Read 179 times)

westingtyler

  • Full Member
  • ***
  • Posts: 158
    • View Profile
    • My Oculus Rift + Touch VR Game Using Playmaker
Swapping Scene Lightmap Bakes At Runtime? (Day/Night)
« on: May 16, 2018, 05:02:15 PM »
If I bake my scene using two different lightmap setups, as two different light map sets (not even sure if that's possible?) it'd be great to be able to load the different lightmap sets into an array as prefabs or something, then switch between them at runtime, like to switch between day and nighttime lighting in the city.

Is that possible?

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 3178
    • View Profile
    • jinxtergames
Re: Swapping Scene Lightmap Bakes At Runtime? (Day/Night)
« Reply #1 on: May 17, 2018, 12:47:53 AM »
Hi.
i believe that Unity stores lightmaps per-scene.

So you might want to duplicate the scene and make a light map for each.

If you use load scene async you could split things up so that you only need to load parts of the scene (where lightmap is used)

Maybe this can get you in the right direction :


westingtyler

  • Full Member
  • ***
  • Posts: 158
    • View Profile
    • My Oculus Rift + Touch VR Game Using Playmaker
Re: Swapping Scene Lightmap Bakes At Runtime? (Day/Night)
« Reply #2 on: May 22, 2018, 03:15:27 PM »
hey, thanks for the info. i don't see anything after the :. it looks like some invisible square if I control+drag over it?

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 3178
    • View Profile
    • jinxtergames
Re: Swapping Scene Lightmap Bakes At Runtime? (Day/Night)
« Reply #3 on: May 23, 2018, 05:45:59 PM »
Hi.
For some reason you are not seeing the youtube video.

Here is the direct link : https://youtu.be/Z73WZksBwTo