How do you deal with dynamic deferred Point Lights in your city that has day/night cycle?

Hello,

Practically, how did you - yourself or your team - actually deal with Point Lights in your city using a dynamic day/night cycle (deferred lights)?

My project is relatively immense and is for mid-end PC machines. Turning all point lights on drops the fps. So I used a trigger collider to turn the lights on/off. (image below) but this is just looking bad and unprofessional, in my opinion.
8332491--1095120--preview.gif

  • Best.

Had my runs with large urban scenes with tons of lights in the built-in deferred renderer. They are “old-school” deferred lights and don’t scale well if you have large radius and 100+ of them visible on the view frustum.

Usually what games do is have assign lights an “importance” value, so some lights are visible at a longer distance than others. Also, instead of outright turning them on and off you fade them in/out by dimming their color based on the camera distance. Keep in mind that doing this for a large number of lights efficiently on the CPU will require some sort of light manager (having several hundreds or thousands of Monobehaviours running Update() can become a bottleneck).

There isn’t much you can do beyond that without resorting to rolling custom rendering solutions, like a custom light probe system which can fade between day and night.

1 Like

Personally, I didn’t have any major performance issues with deferred lights in the built in rendering pipeline. Just make sure that they are not casting shadows. That will kill your performance indeed. Also check the radius of your lights. If they are huge, you will get a ton of overdraw in the light pass.

1 Like

Thank you for the helpful replies, I had set up the shadows wrongly. Once I made the shadow to be enabled if the player is within a certain range using trigger collisions, effectively the lights do not affect the performance of the game.

1 Like