I have a project im optimizing performance for. I have noticed that in 5.3 specifically, when Global Illumination is set to Cinematic in the engine scalability settings there is a huge issue with GI eating up an insane amount of performance. But if I go out of my way to set the GI to Epic, but leave everything else on Cinematic, it fixes the performance issue. It seems to have something to do with mesh traces when the setting is set to cinematic.
I would note, it says you’re tracing mesh SDFs, and given that SWRT lumen is generally considered the performance option as opposed to HWRT as the quality option, I wouldn’t be surprised if the path of cinematic scalability has a bug when used with SWRT.
Mesh SDFs carry a tracing cost per-object, similar to HWRT lumen. If the scalability settings do something where the global distance field atlassing somehow gets ignored and exclusively mesh SDFs are traced, I could see it potentially getting as expensive as it seems there, but it would really depend on your scene density.
Gotcha. Honestly I am not sure what SDF, HWRT or SWRT equate to. Are you talking about detailed tracing and global tracing?
Going from epic to cinematic is a 14x performance hit in this case. Its pretty significant. I just have a gas station level that is filled with relevant objects. I do have quite a bit of lights in that particular part of the level that im currently optimizing. But when I was in 5.1 or 5.2, I was still getting above 30 fps on cinematic. In 5.3 it goes clear down to 12 fps. I have been trying to figure out why, and that seemed to be the culprit.
Are there options I can mess with that will potentially reduce the hit Mesh SDFs take? (whatever those are, still learning)
lumen GI and reflections was designed to scale from low-end PCs to modern consoles to the RTX-powered supercomputers of today. To compute indirect lighting, it uses ray-tracing, but it traces rays on two different scenes: there’s the cheaper ray-tracing called software ray tracing (SWRT) and then there’s the more expensive hardware-accelerated Ray-tracing (HWRT). SWRT traces rays against signed distance fields (SDFs), which are blobby representations of the scene that are fast to trace against. Since they don’t match up with the geo 1-1, you can have light-leaking and missing detail.
To trace against Signed distance fields still means tracing against a bunch of individual objects, but you can also merge every mesh’s SDF into a low-res global distance field that’s much cheaper. Detail tracing tests individual mesh SDFs, global tracing is just the global distance field.
Hardware ray tracing meanwhile can intersect against the same geometry that the Gbuffer has (with a few caveats), so it’s generally more accurate but much more expensive. That said, there is no reason your SDF scene should be performing that terribly, especially with a small scene and a tame instance count. Do you have an RTX card?
Okay gotcha, appreciate your breaking down the science. always interesting to learn more about that. Definitely gives me more context into all of it. I have an RTX 3090 Ti.
I tried switching between detailed tracing and global tracing and it gives me back a couple more frames, but definitely not enough. But the issue still seems to be the same. I also tried converting everything to nanite (with the exception of incompatible or non-essential meshes) and it makes no difference. Also nanite static meshes materials get jumbled when adjusting engine scalability in 5.3 lol. But whatever I just run the reloadshader command.
If you have an RTX card, how come you’re using software ray-tracing? With as much VRAM as you have, you should be able to use HWRT and get better quality and perhaps even better performance.
Well, despite the power I have, the game im working on is meant for low-end and medium-end PC’s. I was only intending on setting up basic raytracing settings for the users with higher end graphics cards. Not necessarily hardware raytracing. I only wanted to dive into the more basic GI features to provide additional lighting for those with stronger hardware. But me not using hardware raytracing really shouldnt be the culprit here.
It shouldn’t be the culprit, yes, but lumen behavior isn’t always intuitive. Although I am curious, how come you had it on cinematic scalability? To my understanding that really is designed for offline, and I think it may be pushing things too far even on high-end PC.
Yeah, im just trying to keep this thread on track so this bug is documented. Cinematic has always been a scalability feature in the engine for as long as I have used it, so im not so sure its designed for offline exclusively, but is an option for high-end users. It scales graphical fidelity proportionally compared to the others. Its a scalability option that is used in many games from what I have seen so im not sure saying its just for offline is accurate.
But I do think its fair to say that a lot of games, especially AAA usually just opt to cap it at EPIC. But if they have the wiggle room from optimization, some may go all the way.
I also do believe many studios start enabling cinematic features during cutscenes depending on the user’s scalability.