Hello. I created a level and have ~55 fps in editor and ~30 fps in game. I tried to look to optimization viewmodes and I can’t see anything very bad:
My default level:
I changed all materials in scene so there is no translucent materials in scene.
I know that I have scene capture component for my character (only character rendering) and it takes ~10-12 fps.
How can I find out what is so hard to render? I have CPU: Ryzen 2600x, GPU: GTX 1070 and I can’t understand how it could not be enough for such little room.
Go to your project settings and make sure you have the beta shadow maps thing off or greyed out. For some reason that makes some games wonky.
A lot of the time when people have GPU issues it is because of dynamic shadows. Try temporarily turning off cast shadows on all of your meshes and movable lights and see if that fixes it. If it does, at least you know what the issue is and can try to work on it. Dynamic shadows are one of the heaviest things in the engine.
If none of that works you can try using the stat gpu console command and see if it says anything useful. That thing is hard to read sometimes though. And sometimes it seems to list things as being heavy that are actually symptoms of other things rather than the actual cause.
I’ve got ~5 fps without beta shadow maps, but now here are 2 problems:
when I moving any object I see message:
and console function is not working;
I see a lot of messages like “StaticMeshActor_16 Static mesh ‘S_Wooden_Chair_uknkaffaw_lod0_Var1’ uses Nanite but Virtual Shadow Maps are not enabled in the project settings. Nanite geometry does not support stationary light shadows, and may yield poor visual quality and reduced performance. Nanite geometry works best with virtual shadow maps enabled. See release notes.”
Okay, I guess if turning off the beta shadow maps started giving you errors, then turn them back on. Or search for “virtual” shadow maps and see if it is talking about something else.
You can also turn off stationary lighting in the project settings. It seems to not like those.
Also, are you using baked lighting? If not, you need to make sure all of your lights are movable. If so, that error up there just means you haven’t baked yet.
-(If it is the shadows, the movable lights could be the ones causing the issue, but it seems like it is easier to fix the errors in front of you atm. How many of your meshes are set to cast dynamic shadows?)
I have no idea why a console command wouldn’t work. Those are built into the engine. I’ve never seen one not work before assuming it was typed in correctly.
I figure I’ll do a general reply because doing one post at a time could take a while. Here are the things that are the heaviest in unreal engine:
Dynamic Shadows. These are caused by movable and stationary lights on anything that is set to cast dynamic shadows (and assuming that the light itself is set to cast shadows). In theory, you could also just turn off all of the shadows by making the lights not make them in the first place.
Translucency. You said you got rid of anything translucent already.
Shader complexity. The only huge thing there seems to be the carpet. I guess you could try removing it to test if it is the issue or not.
Edit: Also, just for another thing you could do: make sure the attenuation radius on the lights isn’t too high. Lights aren’t as heavy as some other things, but they can still cause some issues if there are a lot of them and they have huge radiuses.
If you need all data here’s the file: KarrynsPrisonRemake-23901901-2023.02.18-13.37.41.profViz (35.9 KB)
I’m not sure if it correct because it seems all the data for editor window, not for new window and I don’t know how to get it.
I guess you could try turning off Ambient Occlusion, since it seems to think that is a huge thing for some reason. It could maybe even just be draw calls, but I think those usually show up in the CPU instead of the GPU.
We have been assuming it is GPU, but maybe you should use stat unit console just to check which one it is.
I’ll be honest though, I’m a bit stumped at this point. Since nothing made a difference you might as well turn all your stuff back on again. I tried.
A little piece of my experience that I will drop in, even though I’m running integrated graphics and you’re running a 1070 I think it will be relevant.
You have stated that you’re using Lumen. Have you tried baking the lighting at all? Just by switching to static/stationary baked lighting I’ve seen my performance jump at least 80% in some cases, and while you do have a dedicated graphics card and I’m running integrated graphics off my Ryzen 7 Mobile, maybe that would help a little bit.
If you like Lumen a lot (and don’t get me wrong - I do too, especially for prototyping), and you don’t like the results, leave it on. It’s worth a shot, and with a room that small you shouldn’t have to spend too long baking your lighting.
If that doesn’t work, I’m stumped as well. I have seen bigger levels that run at 50-60 FPS on my integrated graphics (some with Lumen, even) so this is definitely very odd.
I already tried to use static light and you’re right there is a cool boost for performance, but it’s too long for me to use static light. Every time I change something a little I need to rebuild light. It’s too exhausting for me ( After some research I think the main problem is in lumen, but I can’t find information about it’s optimization.
In this case, my suggestion is to use Lumen for prototyping and, if all else fails, bake the lighting for any finished releases. That may be a day away, a month away, a year away, etc., but it would get around the exhaustion of using baked lighting for every little thing. Not to mention that static light baking still relies on the CPU instead of the GPU (which I’m fairly certain is designed for that kind of workload, but I’m not a hardware engineer so I could be wrong), so if you don’t have a Threadripper or Xeon you’ll probably be waiting a while.