Announcement

Collapse
No announcement yet.

Best Solution(s) for Dynamic Lights Performance Issue?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Best Solution(s) for Dynamic Lights Performance Issue?

    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.
    Last edited by eduniga; 06-19-2019, 03:39 PM.

    #2
    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...
    https://docs.unrealengine.com/en-US/...hts/index.html
    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.
    https://docs.unrealengine.com/en-US/...nds/index.html

    Also look at the engine's scalability settings.
    https://docs.unrealengine.com/en-US/...nce/index.html
    UE4 Runs Amazing On Old Hardware (Age of hardware 2004-2011)
    | Intel Core i7-2600K @ 3.4GHz | EVGA GTX 570 1280MB 320-bit GDDR5 | G.SKILL Ripjaws 16GB (4 x 4GB) DDR3 1600 |
    | ASUS SABERTOOTH P67  |  4x WD Raptors & 4x WD Black Drives @ Over 4TB | Dell UltraSharp 2405FPW LCD Monitor |

    Comment


      #3
      IceDDZ
      specs:
      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.

      Comment


        #4
        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.

        Comment


          #5
          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.

          Comment


            #6
            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!

            Comment

            Working...
            X