Nanite
Nanite is the virtualized geometry system in Unreal Engine 5, developed by Epic Games. It is an internal mesh format together with a renderer that draws very high triangle counts and very high object counts by computing only the geometric detail that is visible on screen for the current view. Nanite imports source meshes built at film or photogrammetry density, builds a hierarchy of triangle clusters with automatic levels of detail, streams that data on demand, and rasterizes it largely through a custom GPU compute pass rather than the conventional hardware triangle pipeline. The goal is roughly one rendered triangle per pixel, so that a model's detail no longer needs to be hand-reduced into discrete LOD meshes.[1][2]
Epic first showed Nanite in May 2020 in a real-time PlayStation 5 demo called "Lumen in the Land of Nanite," presented as the reveal of Unreal Engine 5.[3][4] Unreal Engine 5 was released to all developers on April 5, 2022, with Nanite and the Lumen global illumination system as its two headline features.[5] Nanite is relevant to virtual reality and augmented reality because it changes how much geometry a real-time application can show, but its design also conflicts with several rendering shortcuts that VR has relied on, so its use in headsets came later and remains constrained.
Origin
Nanite was led by Brian Karis, an Engineering Fellow for graphics at Epic Games. The technique and its public name were introduced alongside Unreal Engine 5 on May 13, 2020, in the "Lumen in the Land of Nanite" demo running live on a PlayStation 5. Epic stated the sequence ran entirely in real time and that the cave environment used photogrammetry-scanned assets imported at source density.[3][4] Karis and his coauthors Rune Stubbe and Graham Wihlidal presented the architecture in detail in the talk "A Deep Dive into Nanite Virtualized Geometry" at ACM SIGGRAPH 2021, in the Advances in Real-Time Rendering course.[2]
The problem Nanite addresses is that traditional real-time rendering scales poorly with triangle count. As triangles shrink toward the size of a pixel, the fixed-function hardware rasterizer becomes inefficient, and studios manage the cost by authoring several reduced-detail versions of each mesh (discrete levels of detail) and by manually budgeting polygon counts. Nanite removes that manual step for opaque geometry by generating continuous levels of detail automatically and by using a software rasterizer tuned for tiny triangles.[2][1]
How it works
Nanite preprocesses each mesh at import time and uses a dedicated runtime renderer that bypasses the engine's normal per-object draw calls.[1]
Cluster hierarchy and level of detail
During import a mesh is partitioned into clusters of 128 triangles or fewer. Clusters are gathered into groups of 8 to 32 clusters; each group is decimated to about half its triangle count and then re-split into 4 to 16 new clusters, and this is repeated to build a hierarchy of progressively coarser detail. To avoid visible seams between neighboring clusters drawn at different detail levels, the decimation leaves the shared boundary of each group unchanged, and the grouping is reshuffled at each level so that every edge is eventually simplified somewhere up the hierarchy. The result is a directed acyclic graph of clusters from which the renderer can select a per-cluster level of detail that matches the on-screen size, giving continuous LOD rather than discrete swaps.[2][6]
Culling and rasterization
At render time Nanite culls clusters that fall outside the view or are hidden. Occlusion is handled in two passes against a hierarchical depth buffer (HZB). The first pass draws objects that were visible in the previous frame and builds an HZB from them; the second pass retests the objects that were previously occluded against that freshly built HZB, so newly revealed geometry is not missed. Clusters whose triangles are larger than about 32 pixels go through the GPU's hardware rasterizer, while clusters of small or pixel-sized triangles are drawn by a software rasterizer written as a compute shader that processes all 128 triangles of a cluster in parallel. For these very small triangles the software path is reported to be about three times faster on average than the hardware rasterizer.[2][6]
Both rasterizers write into a single visibility buffer that stores, per pixel, a 64-bit value packed as 30 bits of depth, 27 bits of visible-cluster index and 7 bits of triangle index, updated with a 64-bit atomic so the nearest surface wins. Material shading is deferred: after the visibility buffer is complete, a separate pass reads the cluster and triangle IDs, reconstructs the surface attributes, and evaluates the material only for pixels that are actually visible. This decouples the cost of shading from the cost of geometry.[2][6]
Data format and streaming
Nanite stores geometry in a compressed format that is far smaller than a standard static mesh with manually authored LODs. In Epic's "Valley of the Ancients" sample, Nanite meshes average 14.4 bytes per input triangle, so an average one-million-triangle mesh is about 13.8 MB on disk, which Epic reports as roughly 7.6 times smaller than the same geometry stored as a standard static mesh with four LODs. The data is streamed on demand at the cluster level, so only the detail needed for the current view is resident; Epic recommends a solid-state drive for runtime storage because of this fine-grained streaming.[7][1]
Supported content and limitations
Nanite began as a system for opaque static geometry and expanded over later Unreal Engine 5 releases. It can be enabled on static meshes, instanced and hierarchical instanced static meshes, spline meshes, foliage, Geometry Collections and landscapes.[1] Support for Nanite skeletal meshes was added as an experimental feature in Unreal Engine 5.5 (2024), letting animated characters use Nanite's single-draw-call rendering and animation levels of detail instead of authored geometry LODs.[8]
The system has firm constraints. Materials on Nanite meshes are limited to the Opaque and Masked blend modes, so translucent surfaces are not drawn through the Nanite path. A scene is hard-limited to 16 million Nanite instances. Nanite requires a graphics card that supports DirectX 12 with Shader Model 6 (SM6), and Epic lists features such as the older forward renderer, multisample anti-aliasing (MSAA) and full ray tracing as outside or only experimentally inside the Nanite path.[1][7]
| Property | Value |
|---|---|
| Maximum triangles per cluster | 128[2] |
| Clusters per group (build) | 8 to 32[2] |
| Software vs hardware rasterizer threshold | triangles under ~32 pixels use the software rasterizer[2] |
| Visibility buffer packing | 30-bit depth, 27-bit cluster index, 7-bit triangle index (64-bit atomic)[2] |
| Average storage | 14.4 bytes per input triangle (Valley of the Ancients)[7] |
| Maximum instances per scene | 16,000,000[1] |
| Supported material blend modes | Opaque, Masked[1] |
| Minimum graphics API | DirectX 12, Shader Model 6[1] |
Relevance to VR and AR
For virtual reality and augmented reality, Nanite is attractive in principle because headset content benefits from dense geometry seen at close range, and large architectural, industrial or scanned environments are exactly the kind of high-instance, high-triangle scenes Nanite is built for. In practice its rollout to headsets has been slow because the technique conflicts with two methods VR depends on for performance: forward shading and certain stereo-rendering paths.[9][10]
Why it was not available in VR at launch
When Unreal Engine 5 shipped in April 2022, Nanite and Lumen did not work in VR. Two factors drove this. First, the cost: rendering a scene in stereo at the higher resolutions VR uses is generally heavier than rendering it once for a flat screen, and Epic described Lumen at the time as targeting about 60 frames per second for outdoor and 30 for indoor scenes on then-current consoles, well below the roughly 90 frames per second most PC VR headsets expect. Second, the rendering path: VR projects commonly use the forward renderer because stereoscopic rendering and techniques such as instanced stereo and foveated rendering have historically been cheaper there, whereas Nanite runs through the deferred renderer.[9][11]
Forward versus deferred rendering
Nanite is only available with the deferred renderer and is not drawn when forward shading is enabled.[11][10] This is the central tension for VR. Forward shading remains the recommended path for many headset projects because it pairs well with multisample anti-aliasing and stereo optimizations, so a project that turns on forward shading to hit frame rate loses Nanite, and a project that uses deferred shading to keep Nanite takes on the heavier deferred cost in stereo. Varjo, for example, advises developers to use forward shading wherever possible and treats the deferred path with Nanite and Lumen as experimental and not production ready, recommending an NVIDIA RTX 3080 Ti at minimum if it is used.[10]
Stereo and platform constraints
Even on the deferred path, Nanite has stereo-specific issues. Varjo notes that instanced stereo rendering can cause flickering on Nanite meshes (with a documented workaround of toggling the setting off and on with editor restarts), that Nanite is incompatible with the quad-view rendering used by some wide-field-of-view headsets and may appear see-through, and that translucent materials must be disabled on Nanite meshes.[10] Nanite is also not supported on mobile XR hardware: it is not designed for the mobile GPUs in standalone headsets such as Meta Quest, and Meta directs Quest developers to its own forward-rendering guidance rather than Nanite.[12][13]
Adoption in VR
Support for Nanite and Lumen in PC VR arrived with Unreal Engine 5.1, which was released on November 15, 2022, after which developers no longer had to fall back to the legacy geometry and lighting systems for high-end PC headsets.[14] Ahead of that stable release, an early test reported by UploadVR in September 2022 showed Heavenue chief executive Alex Coulombe running a Nanite and Lumen scene at 90 frames per second on a laptop with a mobile RTX 3080, streamed to a Meta Quest over Air Link.[12] By the Unreal Engine 5.5 series in 2024 and 2025, community demonstrations using the deferred renderer together with NVIDIA DLSS upscaling showed Lumen and Nanite running in VR at 90 frames per second on midrange and high-end GPUs, though Epic still does not position deferred-path VR as the default and the approach depends on powerful hardware.[15][10]
Timeline
| Date | Event |
|---|---|
| May 13, 2020 | Nanite revealed in the "Lumen in the Land of Nanite" PlayStation 5 demo at the Unreal Engine 5 reveal[3][4] |
| 2021 | "A Deep Dive into Nanite Virtualized Geometry" presented at ACM SIGGRAPH 2021[2] |
| April 5, 2022 | Unreal Engine 5 released with Nanite and Lumen; VR not supported at launch[5][9] |
| November 15, 2022 | Unreal Engine 5.1 released, adding Nanite and Lumen support for PC VR[14][12] |
| 2024 | Unreal Engine 5.5 adds experimental Nanite skeletal mesh support[8] |
See also
References
- ↑ 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 "Nanite Virtualized Geometry in Unreal Engine". https://dev.epicgames.com/documentation/en-us/unreal-engine/nanite-virtualized-geometry-in-unreal-engine.
- ↑ 2.00 2.01 2.02 2.03 2.04 2.05 2.06 2.07 2.08 2.09 2.10 Karis, Brian; Stubbe, Rune; Wihlidal, Graham (2021-08-10). "A Deep Dive into Nanite Virtualized Geometry". ACM SIGGRAPH 2021 Courses: Advances in Real-Time Rendering in Games. https://advances.realtimerendering.com/s2021/index.html.
- ↑ 3.0 3.1 3.2 "Unreal Engine 5's demo is the next-gen graphics showcase you've been waiting for". 2020-05-13. https://www.washingtonpost.com/video-games/2020/05/13/unreal-engine-5s-demo-is-next-gen-graphics-showcase-youve-been-waiting/.
- ↑ 4.0 4.1 4.2 "'Lumen in the Land of Nanite' demo isn't playable, but it might be one day". 2020-05-13. https://www.inverse.com/gaming/lumen-in-the-land-of-nanite-release-date-ps5-demo.
- ↑ 5.0 5.1 "Unreal Engine 5 is now available!". 2022-04-05. https://www.unrealengine.com/blog/unreal-engine-5-is-now-available.
- ↑ 6.0 6.1 6.2 "From Navisworks to Nanite". 2023-04-03. https://www.thecandidstartup.org/2023/04/03/nanite-graphics-pipeline.html.
- ↑ 7.0 7.1 7.2 "Nanite Technical Details". https://dev.epicgames.com/documentation/en-us/unreal-engine/nanite-technical-details.
- ↑ 8.0 8.1 "Unreal Engine 5.5 Release Notes". https://dev.epicgames.com/documentation/en-us/unreal-engine/unreal-engine-5-5-release-notes.
- ↑ 9.0 9.1 9.2 "Epic Releases Unreal Engine 5 But Its Headlining Features Aren't Ready for VR". 2022-04-05. https://roadtovr.com/unreal-engine-5-release-nanite-lumen-vr/.
- ↑ 10.0 10.1 10.2 10.3 10.4 "Recommended Settings". https://developer.varjo.com/docs/unreal/ue5/unreal5-recommended-settings.
- ↑ 11.0 11.1 "Nanite and Forward Shading Compatibility Issue in Unreal Engine 5.1.1". https://forums.unrealengine.com/t/nanite-and-forward-shading-compatibility-issue-in-unreal-engine-5-1-1/873149.
- ↑ 12.0 12.1 12.2 "Unreal Engine 5's Nanite & Lumen Now Work With High-End VR". 2022-09-16. https://www.uploadvr.com/unreal-engine-5-lumen-nanite-vr/.
- ↑ "Forward Shading Renderer". https://developers.meta.com/horizon/documentation/unreal/unreal-forward-renderer/.
- ↑ 14.0 14.1 "Unreal Engine 5.1 is now available!". 2022-11-15. https://www.unrealengine.com/blog/unreal-engine-5-1-is-now-available.
- ↑ "UE5.5.4 - (DLSS) VR Lumen & Nanite Deferred at 90FPS". https://opentools.ai/youtube-summary/ue554-dlss-vr-lumen-and-nanite-deferred-at-90fps.