Download

A scene with dark forest + character carrying a torchlight. Torchlight gives huge performance issues

The forest works at fine FPS in daylight setting, but when I try to make an night scene out of it where you carry a torchlight to lite areas near you, the framerate drops by 20-30 fps to rather poor levels.
I understand the issue is because of large ammount of foliage on the ground, and torch containing a movable pointlight.
I wonder if there is a smart way around the issue, or is my combination something that Is beyond my skills to implement and I should just scrap the idea.

If you can switch to a spot light (flashlight or oil lamp), the framerate should be much better (5 times better than point light).

What hardware are you running on?

Also, what type of radius are you using for your light? What kind of ground foliage?

You may need to set smaller ground foliage not to cast dynamic shadows. Also, are you by any chance all paying the cost for a dynamic moon light? you mentioned daylight so I am wondering if there is a time of day system and if so, do you make sure to set the sun to 0 brightness or disable it at night?

  1. Yeah, I have tried spotlight as well. It lowers FPS too, but not as baddly. But its not nearly as neat looking and loses most of impact. I might still concider it with some tweaks.

  2. My hardware is i4770 processor, 16gig mem, GTX760 gpu. I am sure I could get better results with stronger GPU, but I am making the game for avarage gpus and I don`t want to put requirements higher than this anyway.

3)Ive set my radius very short and dynamic shadows off (from the foliage). Ground foliage is hundreds and hundreds of 16tri planes with simple material animation. Question about dynamic moonlight is good, as I do have that in fact. I have kept that since it has saved me time and energy and allowed me freedom in workflow and creation both. I have been ok in inside locations when Ive kept my point light sources far enough from each other, but the foliage scene is the scene that has made me question about my workflow again. I haven`t set the sun/moon to 0, since I still wanted to keep the ambience of my dynamic moon, without turning everything to too dark but perhaps this is not the right way to go.

what version of UE4 are you using? maybe you can really shorten your main sun dynamic shadow radius and use distance field shadows to get more performance? and possibly at night you could even set the “moon” (which is really just a dark blue sun) to have 0 dynamic shadow distance and be all distance field lighting based. That might work but would have to give it a shot. Requires 4.8.

Baking night with a dynamic day could be pretty tricky. You could try a hacky like always having a dim moonlight there that is so dim it won’t mess with the shadows of your dynamic sun. Then boost up the exposure so the dim baked moonlight is bright enough.

>>You could try a hacky like always having a dim moonlight there that is so dim it won’t mess with the shadows of your dynamic sun. Then boost up the exposure so the dim baked moonlight is bright enough.

Thanks, I will keep that tip in my mind! For now, I didn`t use it yet afterall.
I simply optimized my lights in the scene by removing/baking an extra “back light” I used to give a gloomy blueish SSS-like side/back tone to the elements in the map.
I simply had too many dynamic lights working at once, and adding 1 more point killed the performance.
Also, just lowering the radius of the pointlight a lot, and faking it to look bigger by editing the particle effect to be bigger, also gave me a good performance boost.

I am using 4.76 currently, so Ill try the 4.8 trick at some point too.