keywords: UE5, Performance Optimization

The previous article: UE4 Performance Optimization

Preface
  1. Consider using test builds when profiling
    Test builds have lower overhead than Development, while still providing some developer functionality. Test builds of a stand-alone executable require cooked content. If you need to iterate while profiling, but want the lower CPU overhead of a Test build, consider using “cook on the fly” (COTF). For example, shader iteration is possible with COTF Test builds.
    Also note that in some older versions of Unreal Engine, you may have to manually enable the STATS macro in Build.h to add support for the stat GPU console command. Also, older versions of UE may require you to enable the ALLOW_PROFILEGPU_IN_TEST macro in Build.h so that the ProfileGPU command is available. More details will be given on stat GPU and ProfileGPU in the Profiling tools section.

Origin:Unreal Engine Performance Guide

Lumen

The key parameters that reduce effects to improve performance:

r.Lumen.TraceDistanceScale=0.01
Shadow

Experiment with reducing this value from the default of 8. The visual difference between any two adjacent values, e.g., 7 and 8, is nearly imperceptible. However, the performance benefit will not go unnoticed, especially in scenes with lots of shadow casting lights:

r.Shadow.Virtual.SMRT.SamplesPerRayLocal

The corresponding SamplesPerRayDirectional has similarly low impact on visual fidelity, but only improves performance on your directional lights (e.g. sun, moon, etc.), which are generally less prevalent in most game levels. Thus modification of this parameter has less of an impact on performance.

r.Shadow.Virtual.SMRT.SamplesPerRayDirectional

Origin:Unreal Engine Performance Guide

Geometry

If GPUScene::Update takes a long time, it may be that the mesh has many UV seams.
Reference: Performance hit “GPU scene update” - reddit

Animation

UE5 Skeleton (Bone) Vertex Animation Texture example.
https://github.com/dawnarc/VertexAnimSample

References

Optimizing UE5: Rethinking Performance Paradigms for High-Quality Visuals Pt.1: Nanite and Lumen - Matt Oztalay, Epic Games
https://youtu.be/Cb63bHkWkwk?t=4799

Optimizing UE5: Rethinking Performance Paradigms for High-Quality Visuals - Pt.2: Supporting Systems - Matt Oztalay, Epic Games
https://youtu.be/8eO2xdrDms8?t=871

Unreal Engine Performance guide
https://gpuopen.com/learn/unreal-engine-performance-guide/


Behave toward everyone as if receiving a guest. -Chinese Proverbs