laurenth-personal / lightmap-switching-tool

Tool that allows switching different baked lightmap sets on a unity scene at runtime.
MIT License
657 stars 88 forks source link

Support of reflection probes? #16

Closed BANZBOWINKEL closed 6 years ago

BANZBOWINKEL commented 6 years ago

Dear Laurenth,

would you be able to implement the support of reflection probes? They do not switch together with the lightning scenarios.

Best, Friedemann

katnyan commented 6 years ago

Hi Laurenth,

I would like to see the implementation of Reflection Probes here.

Also, from the ReadMe; it says "Mixed lighting mode are supported (tested only "baked indirect" and "shadowmask")" - Seems like this is working for Subtractive also.

laurenth-personal commented 6 years ago

Hi, I'm sorry I didn't reply sooner I didn't notice these issues. I think it should be very easy to have reflection probes switch too but I need to perform a few more tests and maybe I'll add en example in the project. I'll try to do that this week.

petergraham003 commented 6 years ago

Hi Laurenth, I tried to implement this solution in my current project. So far everything looks good except for a couple of items.

  1. I am using Baked Reflection probes in my existing scenes and now I couldn't load them with this solution now.
  2. While loading the lightmaps, it takes a couple of seconds to load. Can we do this any faster so that the user will not have that weird experience.
laurenth-personal commented 6 years ago

Hi, I just merged a little fix for better support of reflection probes switch and the example has been updated to include a reflection probe. If a reflection probe is detected in the lighting scene, then the lighting scene gets loaded at runtime when the lightmap swap happens.

laurenth-personal commented 6 years ago

@petergraham003 I hope these changes help you with the reflection probes workflow. Regarding the loading times this depends a lot on the platform, I have been using this script on a level with quite a few lightmaps (6 or 7 1024x1024 directional lightmaps) and the switch took at most 2 seconds on ps4. This is not a script designed for use on an instant light switch in every room of a game for example. My idea was to allow people to switch only the lighting on a scene with a very short loading time and avoid having to duplicate the scene and reload it completely. I should add this to the readme. I personnaly use it with a little fade to black at the beginning and fade back to the game at the end.

laurenth-personal commented 6 years ago

Closing the issue, feel free to open a new one if you have problems with the reflection probes