Hello, I’ve been working on a little game with a small level. It’s an apartment with like 6 dynamic/movable point light that can be turned On/Off. Turning these lights on cause some performance issue in the frame rate. I know this topic has been talked about before but I can’t seem to find a proper solution or workaround. I’ve tried making my lights stationary but having stationary lights means you can’t completely turn them off because the light is already baked, you can only slightly decrease the intensity, additionally the baked light goes through objects like doors for some reason. I once posted a similar question here and a user suggested turning cast shadows off from the lights, but that causes light to go through walls. I’m on a dead end here, what exactly can you do about this? There must be some workaround as some games made in unreal feature on/off lights and are optimized. I’m thinking is there a way to only cast shadows of the objects when they are visible to the characters view and disable them when not? I could just maybe disable them from the objects themselves and no the light but I don’t want my game to look completely shadowless. I’ve also read about casting shadows depending on the player’s distance but this does not work on point lights. Any suggestion, workaround, tweaks, solutions? Thanks.
I think some more details from you may be needed to fully understand the issue. Screenshots are always useful, not only of the environment but also the point/spotlight settings. Also system specs, what version of the engine you’re on, and really anything else that can have a large impact on figuring it all out.
First suggestion I have without all the above information is to check out this…
Specifically the Shadow Map Caching & Performance part.
You can break down a lot of details with the statistics of what is using your performance the most and better pin-point your issue.
Also look at the engine’s scalability settings.
ram: one stick 8 gb DDR3
cpu: amd fx 8350
gpu: GTX 1050 ti
motherboard: Gigabyte Technology Co. Ltd. 970A-DS3P (CPU 1)
I know I don’t have the best specs but still decent enough to play demanding games at a decent quality. My game is a really small level so I think the problem isn’t my specs it’s just that my game is not optimized. The game runs fine when the lights are turned off but as I start turning them on, the frame rates starts decreasing more and more. Dynamic Lights are known for hindering performance. I’ll include pictures.
I disabled the dynamic shadow caching thing based on the first link, it improved a tiny bit by adding a few frames but still affects performance greatly.
You have to find a way to reduce the number of shadow-casting lights somehow. There’s no escaping the dynamic shadow performance in UE4 right now, since each point light renders six views for each side of a cubemap to get 360º shadows.
If you want to be able to turn off stationary lights, you can simply set their indirect light contribution to zero. This will stop them from generating bounced lighting, so they will disappear completely if you change their color to black during run-time.
@Manoel.Neto Yes! I had already found the solution, like you said, I must make the lights stationary and turn off the indirect lighting! Thanks anyways!