Making Street Lights Less Expensive

Hi, I have large scene with a lot of street lights… see image below.

The scene runs at approx 40 FPS but that drops significantly when the street lights turn on at night. To 16ish and less.

My lighting settings are:


3948982--338125--lights-3.PNG

Each of the streetlights has the following settings. The Lamppost has a Spot light attached as well as a script that Enviro uses to turn lights on/off. Here are the settings of each spotlight:

3948982--338131--lights-4.PNG

Render Path in Project Settings is Deferred.

I haven’t done a Realtime Generate as yet.

What can I do apart from remove lights to get the project to run with less of and FPS drop when lights come on?

Any assistance appreciated. Thanks

You will need to forget the real-time lights in this number. It’s too many. You will need to switch to area lights or emissive material and bake lightmaps. You can bake more than one and switch it according to the changing environment but be prepared that it won’t work every time (visually) because the day-night cycle and the weather changes are too many combinations.

If you don’t want to sacrifice the quality, you will need to build a system, where a couple of the closest lights are real time lights the other ones are fake. You haven’t stated what rendering are you using, so I will leave the research up to you.

1 Like

Thanks for the response, I have read up on the various light types etc but it all makes no sense to how it actually all works so seems this is way beyond my understanding. Unfortunately your response doesn’t really help me much as I was looking for a “how” answer to be honest… but thanks anyway. Much appreciated.

Looks like you kicked me into a heavy study session or two. Thanks for that.

1 Like

That was my intention. :smile: You’ll be better off when you’re done, next time you’ll know what to do in similar situation.

1 Like

Hi, not sure if your still following this but I think I get the idea.

In the image below I added an Area Light (disc) to a lamppost and then created a Lamp/bulb for the actual light with an emission material.

Not When I eventually bake the whole scene I can use Enviro to change the emission texture at night to switch the lights on and then to change the material to switch the lights off in the morning.

Problem I’m having getting my head around is changing the road and terrain textures at day and night.

Normally I would have a NightLights.cs script attached to the Street light that activated and deactivated the lights on the object lampposts… in this case area lights. And so my question would be would this also change the textures to use the light maps created at bake time? ie when the Area lights were deactivated and reactivated through the script?

On the demo below deactivating the light works fine but each time the lights are baked which wont be possible with the end result. Can you enlighten me as I have seen nothing in my search to get this far.

Heres the demo I created of a working light. Just needs a bit of bloom in the post processing when I addd that.

3953146--338773--lights.png

Thanks again.