top of page

Nanite: What You Need To Know - Unreal Engine

Updated: Jun 30, 2023

When Unreal Engine 5 released they launched a new feature called Nanite although you may be asking yourself what it is?

In this article I am going to cover what you need to know about Nanite, when you should use it, its benefits and it's limitations.

 

Nanite Unreal Engine


Table Of Contents




How To Enable Nanite?


First of all before we do anything you need to know how to enable Nanite in Unreal Engine and its very simple.


There are two ways you can do this.


Method A


When importing a static mesh into Unreal Engine click the Build Nanite and this will automatically make the mesh Nanite.


Enabling Nanite On Import Unreal Engine


Method B


If you already have a static mesh in Unreal Engine open it up and go to Nanite Settings and check the Enable Nanite Support then click apply changes.


If you ever want to stop using Nanite, simply just uncheck that box again and click the apply changes button.


Enabling Nanite Unreal Engine


What Is Nanite ?


Nanite is a very efficient way to render objects on a screen. The way it works is by breaking down meshes into clusters of triangles.


If you drag a Nanite mesh into your scene.


Then in the viewport tab select the following Lit > Nanite Visualisation ( This will show a list of all the Nanite view modes). I am just going to show one mode > Clusters. This will show you how Nanite breaks down meshes into clusters of triangles.


Nanite  View Mode In Unreal Engine


You will see that the Nanite model has been split into many different individual colours, each colour represents one cluster.


Clusters adjust based on the size they are on the screen, distance away from the camera and resolution.


Clusters will be culled (reduced or removed) when they are not visible on the screen. This allows nanite meshes to have many LOD's. When you zoom into a Nanite mesh you will see many different clusters and as you move away from the mesh you will see it breakdown into larger clusters.


This allows meshes to be very optimised.



What Are The Benefits Of Nanite


  • Nanite allows you to directly import high quality models into your projects, you can use photorealistic scans and high poly models without having worry about how it will effect the performance of your game or project. Nanite can handle millions of polygons being on the screen.

  • Nanite automatically calculates LOD's you do not have to worry about making multiple LOD's for versions of your model Nanite will handle this.

  • In games sometimes normal maps are used to increase the quality of a model to make it look more realistic. With Nanite you can just directly import that high quality model without baking in normal maps this can save you time.

  • Kit bashing is easier. Kit bashing references the concept where you take a bunch of models from different places and combine them together to create a scene. Before it was not as efficient to do. As Kit bashing meant you would have to load in many different models which could drain the performance of your project.

  • Nanite compress meshes very well which can improve the performance of your project and it will take up less memory on your disk. Below you can see the comparison between two meshes which have the same amount of triangles. You can see the Nanite mesh is around 7x smaller.


Nanite Mesh Details



What Are The Limitations Of Nanite


  • It does not work that well with Aggerate Geometry.

  • Aggregate geometry is geometry that has fine details such as as hair, leaves on trees, and grass. Although In Unreal Engine 5.1 Nanite has been updated to work with foliage and Unreal Engine is continuously improving so this could change and it doesn't mean you can't enable nanite on these types of geometry.


Hair In Unreal Engine

  • It also does not work so well with Closely Stacked Surfaces. This is when loads of meshes are stacked on top of one another. Nanite does a good job of detecting static meshes and optimising them although when mesh is close together. Nanite sometimes is not able to determine which is on top or bottom, causing both meshes to be drawn simultaneously. This can result in overdraw when the same pixel is drawn multiple times in a single frame which is not efficient.

  • An example of this is shown in the image below.



Stacked Nanite Meshes

Nanite also only works with certain meshes. Nanite Does not support:


  • Deforming/skeletal meshes

  • Splines Meshes


When Should You Use Nanite?


Nanite should be used where possible as you get much better performance, better memory management and it will take up less memory on your disk.


The Unreal Engine Documentation recommends you should use Nanite :

  • When a mesh contains many triangles, or has triangles that will be very small on screen.

  • When a mesh has many instances in the scene, so if your using the same model multiple times.

  • If the mesh acts a major occlude ( an object that blocks light ) an example of this would be a big closed mesh like a giant cliff face.



Summary


Hopefully you know have a better understanding of what Nanite is, how it works when it should be used, its benefits and limitations.


To get notified of upcoming posts on Unreal Engine, I invite you to subscribe to our newsletter:




And if you are just getting started learning Unreal Engine, have a look at the Unreal Engine for Beginners Course :

3,520 views0 comments
bottom of page