[[Unreal Engine]]'s Nanite expects extremely dense models and dynamically alters them depending on their occlusion and distance like any standard frustum culling, level of detail, or tessellation technique, except able to handle much larger meshes. > Nanite is Unreal Engine 5's virtualized geometry system which uses a new internal mesh format and rendering technology to render pixel scale detail and high object counts. It intelligently does work on only the detail that can be perceived and no more. Nanite's data format is also highly compressed, and supports fine-grained streaming with automatic level of detail. # Limitations Nanite only works with static non-deformed meshes. > Nanite supports dynamic translation, rotation, and non-uniform scaling of rigid meshes, but does not support general mesh deformation, whether it is dynamic or static. This means any position of a Nanite mesh in a way that is more complex than can be expressed in a single 4x3 matrix multiply applied to the entire mesh. Any type of deformation is not compatible with Nanite, including: - Skeletal animation - Morph Targets - World Position Offset in materials - Spline meshes And the Unreal Editor tools: - Custom depth or stencil - Vertex painting on instances - This specifically means per-instance painted colors using the editor's Mesh Paint mode. - Vertex colors imported on the original mesh **are** supported. > The maximum number of instances that can be present in the scene is hard-locked to 16 million instances, which includes all instances that are streamed in, not just ones enabled for use with Nanite. Only instances streamed in are counted towards the total. # Features Nanite was introduced in Unreal Engine [5.0](https://docs.unrealengine.com/5.0/en-US/nanite-virtualized-geometry-in-unreal-engine/). - Multiple orders of magnitude increase in geometry complexity, higher triangle and objects counts than has been possible before in real-time - Frame budgets are no longer constrained by polycounts, draw calls, and mesh memory usage - Now possible to directly import film-quality source arts, such as ZBrush sculpts and photogrammetry scans - Use high-poly detailing rather than baking detail into normal map textures - Level of Detail (LOD) is automatically handled and no longer requires manual setup for individual mesh's LODs - Loss of quality is rare or non-existent, especially with LOD transitions >[!NOTE] > Although the advantages can be game-changing, there are practical limits that still remain. For example, instance counts, triangles per mesh, material complexity, output resolution, and performance should be carefully measured for any combination of content and hardware. Nanite will continue to expand its capabilities and improve performance in future releases of Unreal Engine. ## ## Per-Vertex Tangents Added in [5.3](https://docs.unrealengine.com/5.3/en-US/unreal-engine-5.3-release-notes/). > Nanite now supports explicit tangents in the data format and runtime. > ... > However, there have always been cases, especially for low-poly models, where the implicit tangents are too imprecise and custom per-vertex tangents are needed to reach target quality. To support these cases, users can now opt to store and use the original model tangents on a per-asset basis. Enabling this comes at a modest cost of an additional ~10% increase in memory and disk footprint for the asset. ## Nanite Spline Meshes (Experimental) Experimental in [5.3](https://docs.unrealengine.com/5.3/en-US/unreal-engine-5.3-release-notes/). > We introduced an initial implementation of the spline mesh component for Nanite meshes. This feature can be enabled by setting r.Nanite.AllowSplineMeshes=1 in a settings `.ini` file. >[!WARNING] > Enabling this feature currently comes with a performance cost that affects culling performance of all of Nanite, and there are currently known issues with incorrect culling under extreme deformation. # Resources ## Documentation - https://docs.unrealengine.com/5.0/en-US/nanite-virtualized-geometry-in-unreal-engine/ - https://docs.unrealengine.com/5.3/en-US/unreal-engine-5.3-release-notes/ ## How it Works - https://gamedev.stackexchange.com/questions/198454/how-does-unreal-engine-5s-nanite-work