Hi everyone
in my map I use projectors to simulate light effects for traffic lights and streetlights, but they are causing too much draw calls. I did excpect this so I was hoping there was a way to cull them when they are far enough from the camera. Yet I have not found a way to do this. I know it’s possible to check the distance and then disable the projector, but there are like 300 traffic lights and over a thousand streetlights. So, is there another solution for this problem? (I’ve tried LOD, but that only culls renderers)
Thanks in advance
G-Modifications
Why are you using projectors for street lights? you should probably change these to use point or spot lights.
and then
Unless you have some reason for these street lights to be dynamic you should bake lightmaps … so there is over a 1000 lights reduced.
How big is the geometry affected by how many lights… When working with many lights over a big area the geometry should be split so that it is not under the influence of many lights all the time.
Thanks
They project on sections of the road (a turn, a piece of straight road, a crossing…) And I think baking is no option because the lights are turned of on day and lit up when it becomes dark. And I should use spot lights? I thought projectors are less expensive, but I could be wrong.
G-Modifiactions
Im sure you could fade the lightmaps in or out. It would require some custom shader code though.
Im not sure which is more expensive between regular lights and projectors (I do know projectors still cause redraws ) but I mentioned Unity lights because of lightmaps… As far as I know projectors do not influence lightmaps baking.
I’ve indeed noticed that projectors don’t affect the baking process. But I’ve found a solution: I use OnTriggerEnter and OnTriggerExit to enable and disable the projectors. There are a lot less draw calls now. I’m not sure if this is the best sulotion, but it works. But thanks for your fast responses and if you have a better solution, I would like to hear it.
G-Modifications