How do I improve my game's performance? (Eg. Lighting, DrawCalls, Textures etc)

I’ve been using UE4 for a while now and my game is starting to take form. It’s time to start cleaning it up performance wise.

So far I’ve found the static lighting / density etc visualizations very useful for determining whether things need to be toned down or increased - although I cannot seem to find the texture size visualization from UDK. This was greatly useful as, if I recall, it visualized the texture resolution of a mesh and showed whether or not it was too large or too small for the mesh size on screen.

I’ve also noticed that the lighting complexity view mode shows I’m in the brownish/yellow - which the documentation states is using 3 or more dynamic lights; which is odd since I’m using purely 1 directional light (stationary.) I only seem to be able tor reduce the lighting complexity by switching my 1 light to static (which removes all shadows from moving objects)

I certainly see a big performance drop at 1080p vs 720p - which usually means a GPU struggling. I have a high end machine, so it’s definitely an optimization problem with my game. I have my texture sizes at 32x32 for particles, 128x128 for small objects, 512x512 for distant objects, 2048x2048 for character models and 1024x1024 for everything else, which seems reasonable to me.

Thanks to Visceral 3D I have reduced my lightmap sizes and texture usage (using instances) which has gained a few FPS - but I still get 45-50fps on my machine (which is very high end work station, so I dread to imagine the issues other users with lower end components would have on release)

I know Unity uses a great system for monitoring performance and what is causing slow downs etc. I could do with some advice on how to optimize my game in Unreal 4. I am, however, quite new to this side of things as I’m usually just the artist. I’m aware that UE4 has the profiler, but I am lost on its use.

Any advice would be greatly appreciated

Well my first suggestions would be to take a look at not how big your textures are but how MANY textures you use. Texture atlases are great for combining lots of textures into one map.
Im kind of guilty of this aswell and i dont use the as often as i should. 3D Motive made a great video on this a while ago.

I would also take a look at my materials, how many am i using? Could i replace some heavy materials with material instances? How many instructions are in some of theese materials, and so on.

For build times i would also like to know the lightmap resolution you have for your meshes. That seems to make the compile times increase alot, but im not sure how much it really matters when it comes to realtime preformance, but it should logically be 1 extra drawcall per object in the scene.

Thats basicly all i can think of from an artist perspective. Reuse textures, make sure they are appropriate size.

Thank you for the reply - much appreciated.

My materials are very simple, diffuse roughness and normal maps straight to the nodes, with a metallic using a (I forget the name of the node, leftclick+1 is the shortcut)

Since my game is a runner style game, the levels are very simple, landscape, some set dressing for the landscape and a modular track with pick-ups and obstacles.

There are roughly 10 materials being used across the whole game, which doesn’t seem like much. However I’ve discovered that texture samples can be converted to parameters, and since they are all very similar I am converting a lot of materials to instances, which has reduced it to 6 materials and 4 Instances.

My lightmap resolutions range are mainly at 128-256 range, since the track is modular, any lower produces artifacts where the meshes join. The largest is at 1024, since it has shadows cast on it from masked objects. The visualization shows blue to light green for everything. The landscape has a lightmap resolution of 4, since any lower produces artifacts.

Thanks for your advice

There is your problem. 256 is my upper limit for lightmaps, you probably should look into whats causing the artifacts (this probably has something to do with how your lightmap UV’s look) and reduce that size.

Thanks, I’ve gone back and improved the texel density of all my secondary UV sets, which has meant I can reduce the lightmap resolution in engine. Now the lowest is 8 and the highest is 256. The majority falling to 128.

I’ve gained roughly 5-10fps (depending on the action on screen) when running the game. I never realised lightmap resolution impacted performance at runtime. It’s definitely a good start. Though at 1080p It’s still only 40-50fps.

your help is much appreciated.