- Home /
Toggle Baked Light
I would create a lighting system where you can turn on/off the lights using lightswitches, so if I use realtime lights this will be good. But the quality of realtime lights is not what I want, and I'm trying to use baked (or mixed) lights. Now the question is: how can I switch on/off a baked lights when I want?
It would be a cool feature indeed, i mean Quake had it... but unity static baked light engine doesn;t supoort this AFAI$$anonymous$$. You can try this with enlighten / dynamic baked lights. It does give you indirect lighting and you can even move lights in realtime.
The problem with dynamic baked lights is that if you turn off the light, there will be a lit area due the pre-computed lightmap. I want completely dark areas when i turn off the light.
Answer by Shadex · May 24, 2017 at 07:39 AM
You can't Baked lighting off to my knowledge, but you can switch out light-maps. What i would do is bake a lightmap with the lights on and a lightmap with the lights off, Then swap the lightmaps by script whenever you "flip the switch". Attached is a link to light-map switcher script for reference. I didn't write it, but you should be able to adapt it to your needs.
Your answer
Follow this Question
Related Questions
Lights not updating real-time. 0 Answers
lighting click help 3 Answers
Ugly green light when baking. 0 Answers
Unable to bake all lights in the scene 1 Answer
Weird dark spots when baking light 1 Answer