Hi there,
i was running my game in the editor and i had about 60 fps, but once i packaged it i dropped to 8 / 10 fps.
i looked a bit through the forum and used “stat unit” command, showing that i have enormous “draw” times. All stats:
Frame - 123 ms
Game - 8 ms
Draw - 123 ms (idk how but its the same as frame time always)
RHIT - 14 ms
GPU Time - 23 ms
DynRes - Unsupported
Draws - 2210
Prims - 1111.5 K (jumps randomly to 3000K for a second)
I’m (trying to be) an indie developer and i don’t know what Draw time is; could someone please explain it to me and what increases it so i can try and solve this issue?
Additional information:
60 fps in editor, no lag
Packaged as Development (and of course Cooked as Development)
Using DLSS (tried both performance and quality mode)
My game has a very large landscape with some very high-poly meshes, all of which have LODs, all lights are static, trees and grass have LODs, grass stops existing completely after a fixed distance.
Another thing you can do ( you have to write a bit of extra code for ), is setup a widget to allow you to progressively remove things from the world until the frame time returns to normal.
Thanks! This looks like an excellent tool!
I am now building it because i use a Unreal Engine source build but i’ll update this thread as soon as i can so this information can be useful for others as well.
i’m doing it right now and i’ll let you know, but in the meantime assuming that’s the cause (already big performance improvment in editor) do you know the right way to do foliage? Like how do you do it so that you don’t lag?
This is probably the biggest question for game engines, ever
You have to tackle the thing from ALL angles, including
. Low poly model ( you can get away with < 100 tris )
. Very quickly ( max 3 LODS ) LOD to a plane with a self shadowing imposter
. That LOD should be set to not generate shadows, of course
. Place the meshes so there is no overlap ( or very carefully controlled overlap )
. Use per instance fade amount in the material
. Shorter grass is better
. Rather than placing any meshes at any great distance, use a landscape material that ‘looks’ like it has meshes on it ( you can make this by snapping a screenshot with a cinematic grass scenario ).
. etc etc etc
I tried to set all foliage actors as “editor-only”, but i didn’t re-package and upload a new server build (to my server hosting service) so when i loaded-in the map the grass still appeard (but strangely the trees didn’t), and performance improved, so my guess is i have to re-do foliage for this map.
Another thing while i’m here, i run 2 client concurrently on the same machine for server-testing purposes. Is the performance halved or just somewhat reduced?
You’re probably using Lumean Hardware raytracing which has a limit of 100k instances and it’s taking a long time to figure out what instance to do it’s passes on. Just a speculation though. Could try reverting to software lumen if that’s the case and see if it improves.
Quick recap for anyone else stumbling here, foliage was causing my performance issues. Use The Unreal Insights tool to see what is making you lag. In my case the problem was with Ray Tracing (see full thread) so i removed it on the grass and this completely solved the performance issues. Disabling shadows also helps a lot, but if you want Ray Tracing in your game (like i do) disable it on the grass since it does literally nothing anyways.