In this lesson, you will learn how Unreal Engine breaks down complex, high-poly geometry into manageable "clusters" to enable real-time rendering of millions of polygons.
The Problem with High-Poly Geometry
Rendering a single model with several million polygons is traditionally expensive because the GPU must process the entire object as one unit. If only part of that object is visible, or if the object is far away, the engine still spends valuable resources evaluating the entire mesh. This is where Cluster-Based Mesh Decomposition comes in.
Breaking Down the Mesh
Nanite, Unreal Engine’s virtualized geometry system, handles this by automatically decomposing your high-poly meshes into small, discrete groups of triangles called clusters. Typically, each cluster contains 128 triangles.
Think of this like packing a giant mosaic. Instead of trying to carry the whole mosaic at once, the engine breaks it into hundreds of small, square tiles (clusters). Because these clusters are small and self-contained, the engine can make intelligent decisions about them independently:
- Efficient Culling: If a cluster is behind a wall or outside the camera’s view frustum, the engine discards it immediately without needing to check the entire object.
- Level of Detail (LOD) Processing: The engine can choose to render a high-resolution cluster for objects near the camera and a simplified, lower-detail version for clusters in the background.
Why This Matters
By decomposing the mesh, the rendering pipeline shifts from being "object-heavy" to "cluster-heavy." Instead of the CPU sending draw calls for an entire statue, it streams these clusters to the GPU based on visibility and distance. This happens so quickly that you can maintain a constant frame rate even with scenes that would historically cause a massive performance hit.
You can inspect this decomposition yourself by using the console command r.Nanite.Visualize 1 to toggle the "Clusters" view mode in your viewport. You will see your models colored in a mosaic pattern, where each color patch represents a unique cluster managed by the engine.
Key Takeaway: Cluster-based decomposition transforms complex geometry into modular, manageable chunks, allowing the engine to cull and simplify specific parts of a mesh on the fly rather than treating the entire model as a single, indivisible entity.