I’m trying to put many static lights to ambient a dark/night map. For performance reasons I don’t want them to light movable objects but I think that’s not possible, so I was wondering if I can save the baked lights data and then delete those lights.
There’s no reason to do this, it will not improve performance. For static lights, movable meshes are lit by sampling the volumetric lightmap, which is baked during the lightmass build. They do not compute the lighting in realtime.
Thanks for the fast reply. So maybe that’s not the culprit of bad performance. My problem is this: I have two identical maps with the only difference being that one is full of static lights everywhere, and it runs at about half fps. I thought static lights were cost-free, but after seeing this drop in performance I was trying to find a way to save light’s influence in the static objects around and then delete them.
Well there’s not much information to work with here but my blind guess is that your lighting is not actually being baked. The editor gives “preview” lighting for static lights which is the same as a moveable light (and has all the same costs), until lighting is built.
Realistically though this is why the performance profiling tool exists, so that you don’t have to take blind guesses at why your performance is bad, you can just measure it and know immediately. If the GPU is the bottleneck then you can just press ctrl shift , to open up the GPU profiler and look at the cost of the rendered frame at that moment. It will bring up a bar chart and a tree of expandable sections with individual timings for each part of the GPU’s rendering process.
You have made me realise that I need to go down the rabbit hole of gpu profiling because I really don’t understand why adding static lights made such an impact on performance (and I’m almost 100% positive they aren’t casting shadows and are being baked). Maybe it has to do with targeting Meta Quest hardware and that some of them are overlapping (which I took for granted was only a problem with movable or stationary).