Unreal Engine Mobile Development Tips

  • Make sure lighting is built before running on a device.
  • Most Post Processing features are disabled for mobile platforms as they are too expensive, like like vignette or screen space reflections. Some GPU intensive features like Bloom and Depth of Field are enabled by default so that PC and mobile look the same but many features can cost 60 milliseconds or more with the default settings on some devices. The console command showflag.PostProcessing 0 can be used to turn off these features to get a general idea of their costs.
  • Make sure to use Precomputed Visibility and that it is set up properly. To do this, place Precomputed Visibility Volumes around areas where the player can walk or jump and then build lighting. You need to make sure to place these in the Persistent level that is used when building lighting and when running the game, so do not build a sublevel by itself. You can verify that Precomputed Visibility is working by entering the console command Stat Initviews on device or in the level previewer and making sure that Statically Occluded Primitives is greater than 0. Use the console command r.ShowPrecomputedVisibilityCells 1 to visualize the cells in the editor.
  • Use masked and transparent Materials sparingly. Only use them in places where they cover a small part of the screen. iOS devices are very optimal in shading opaque surfaces, as they will only shade each pixel once, but for masked and translucency, every single layer will have to be shaded. The total GPU time of a frame can be doubled or more by having overdraw. Use the Shader Complexity view mode to investigate any hot spots.
  • Draw calls of the entire scene should be <=700 for any single view. Areas with poor occlusion, like looking over a large landscape, is going to be biggest challenges for this. This can be seen with Stat OpenGLRHI on device or Stat D3D11RHI in the Previewer on PC.
  • Triangle count of the entire scene should be <=500k for any view. This has been determined to be the maximum poly count that can hit 30fps on both iPad4 and iPad Air. This can be seen with Stat OpenGLRHI on device or Stat D3D11RHI in the Previewer on PC.
  • Materials should use as few texture lookups and instructions as possible. You have five texture samplers available, but using all of those makes for a fairly expensive Materials. For now, use the PC instruction count to optimize and the Previewer shader complexity to visualize the total cost.
  • Only use independent texture fetches in Materials. This means UVs in the pixel shader (BaseColor, Roughness, etc.) must not be manipulated in any way, such as scaling. Use the CustomizedUVs feature instead to do the scaling in the Vertex Shader. Some special features like environment mapping require math on the UVs and that is OK for special cases.
  • It is recommended to use square textures as they have less memory waste. Always use power of two dimensions for these (256×256, 512×512, 1024×1024). Use the console command ListTextures in the Previewer to see where all the texture memory is going.