In this lesson, you will learn how to reduce the computational cost of animated characters at a distance by implementing Skeletal Mesh Level of Detail (LOD).
Why Skeletal Mesh LODs Matter
Unlike static meshes, skeletal meshes carry a dual performance tax: they require both vertex processing for geometry and CPU skinning/bone animation calculations. As a character moves further from the camera, rendering thousands of vertices or updating dozens of joints for a character only a few pixels tall is an inefficient use of your frame budget. Skeletal Mesh LODs allow the engine to swap the high-fidelity mesh for a decimated version with fewer bones and triangles.
Configuring LOD Settings
In the Skeletal Mesh Editor, you will find the LOD Settings panel. By default, Unreal Engine can auto-generate these, but for performance-critical scenarios, manual control is preferred:
- Reduction Settings: Adjust the
Reduction Settingsto decrease theTriangle PercentandMax Vertex Count. - Bone Reduction: You can define a
Bone Reductionfilter to remove unnecessary joints (e.g., finger bones) that are invisible at long distances. This significantly reduces the CPU cost of the animation update. - LOD Distance: Define the
Screen Sizeat which the LOD transition occurs. A screen size of1.0is full resolution, while0.1represents an object covering 10% of the screen height.
Optimization Workflow
To effectively implement this, you should visualize your LOD transitions using the r.SkeletalMeshLODInfo 1 console command. This highlights which LOD is currently active on your meshes in the viewport.
For high-density crowds, you can also enable LOD Hysteresis to prevent "popping," where the mesh rapidly oscillates between two LOD levels when the camera is right at the threshold distance.
// Example: Force a specific LOD for a skeletal mesh component in Blueprints or C++
// SkeletalMeshComponent->SetForcedLOD(1);
// Note: Only use this for specific optimization debugging;
// let the engine handle automatic switching based on screen size.
By aggressively stripping vertices and bones on distant characters, you preserve your frame budget for the meshes that are currently occupying the player's focus.
Key Takeaway: Skeletal Mesh LODs simultaneously alleviate GPU vertex processing and CPU bone-animation overhead, making them essential for maintaining consistent performance in scenes with many animated characters.