So I’ve been working on a project that has extremely high draw calls which cause my frame to drop to around 50ms (around 20 frames per second). I’m just going to give as many details as I have discovered and hopefully, someone can help me with this issue.
I’ve been spending the last two days trying to find out what is causing my draw calls to go up to 7000-8000 at some specific parts of my scene.
So what I did was I hid every mesh using this command “showflag.staticmeshes 0”. The draw calls went down from 7000 to 6500.
I hid every light and the results were quite shocking. The draw calls were reduced from 6500 to 4500, but still quite high.
I hid almost everything (not everything because if I press alt+a my unreal engine crashes) and I got about 3500 draw calls. This is extremely confusing because the scene was pure black at that point but the draw calls were still high.
I managed to somehow hide everything but a cube by selecting the option “Show only selected”. I still had 300 draw calls.
I then created a new level in the same project, opened it and I had only 90 draw calls with a directional light, sky atmosphere, a sky and etc.
By the way, I’m using an RTX 2060, core i7 6600k, and 16GB of ddr3 ram.
My target device is also computers with the same specs or higher.
I also know that the problem is not from my GPU because in the stats the GPU ms was as low as 15 ms and I also tested this project with an RTX 4090 as well.
I would really appreciate it if anyone can help me to find the solution to this issue.
I’ve enabled the unit details and from what I saw the draw was on 50ms which was also red. I’m assuming my draw is too high because every time my draw calls (which I also enabled from the stats) go up to 8000 my game goes on 10 fps.
I also have to mention that I haven’t programmed anything yet and have no animations or physics in the scene. Purely the design with some objects using nanite and the character I use to walk around is the default Unreal Engine character.
If you need any screenshots or specific details about my scene please let me know because solving this would be a huge help.
Edit: I also launched different projects like Lyra or my old projects. They have an average of 500 draw calls and my fps is on 80.
That looks like a lot of VRAM getting used there. I’m wondering about how many textures you’re using in the scene, or perhaps a lot of different models.
I’m quite confused because most of the textures are either 2k in jpg format or really low quality such as 500*500 or even less with a 20kb size. There are however a lot of materials that are not instanced. Does that have anything to do with this?
I also have to add that my Vram increases exponentially when I enable nanite even though the meshes don’t have more than 1000 tris and only like around 5 meshes in the whole scene have 10k or less.
I’ve turned off the Nanite. Surprisingly my VRam is still on 20gb and I’m getting lower frames.
Is there a way to confirm if the materials are actually causing this problem?
Because in Ari’s video in Unreal Fest about optimization he said make sure you know what is slowing down your project first so I’m trying to confirm it but I don’t know how to.
There is a way that’s frankly easier than profiling. Basically, you run a ‘binary’ chop on the assets: ( disable auto save )
Check removing everything from the map gives you back your fps
Then remove only half, to figure out which half holds the problem.
Then only remove half of that half, and so on.
This won’t hunt down subtle problems, but will catch 90% of them.
It’s very hard to troubleshoot this sort of thing remotely. But there must be something pretty off to bring this rig to its knees like this.
If you want to know if materials is the problem, just set everything to ‘basic shape material’ and see what happens. Also, if your scene consists of thousands of different meshes, all with different materials, that would do it ( cause the problem ).
If you textures are 500x500 and not 512x512, they might not mip or reduce resolution correctly. You can also try setting the texture resolution scalability setting to low just to see if lowering texture detail improves things enough.
If you wanna cut the level down a bit and migrate it to an empty project, you can PM me a link if you like. I can probably load a more minimal version.