# How to optimize Nanite enabled mesh?

**URL:** <https://forums.unrealengine.com/t/how-to-optimize-nanite-enabled-mesh/233444>\
**Category:** Rendering\
**Tags:** General, unreal-engine, UE5-0, Nanite\
**Created:** [June 4, 2021, 11:01am UTC](https://forums.unrealengine.com/t/how-to-optimize-nanite-enabled-mesh/233444 "2021-06-04T11:01:36Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![crystal6tak](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@crystal6tak](https://forums.unrealengine.com/u/crystal6tak)\
**Post date:** [June 4, 2021, 11:01am UTC](https://forums.unrealengine.com/t/how-to-optimize-nanite-enabled-mesh/233444/1 "2021-06-04T11:01:36Z")

</div>

Hey all! Wanted to try out Nanite.

I used a prebuilt environment “City Subway Train Modular” on the marketplace (it’s free).

Created a UE4 project with it, opened it in UE5, then enabled nanite on all the static mesh with opaque material. Rebuilt lighting with production quality. Packaged and tested the fps. I later enabled virtual shadows, rebuilt lighting, and packaged that as well.

So I currently have 4 builds.  
-Stock with no changes, straight packaged.  
-Nanite enabled, packaged.  
-Stock, virtual shadow enabled, packaged.  
-Nanite enabled, virtual shadow enabled, packaged.

These are the FPS I’m getting in three different machines:  
1070  
Normal: 112  
Nanite: 85  
Normal + Virtual Shadow: 40  
Nanite + Virtual Shadow: 36

3070  
Normal: 160  
Nanite: 140  
Normal + Virtual Shadow: 70  
Nanite + Virtual Shadow: 65

5700XT  
Normal: 92  
Nanite: 82  
Normal + Virtual Shadow: 37  
Nanite + Virtual Shadow: 35

Here’s a link to the packaged builds if you guys wish to test yourself: [https://drive.google.com/file/d/1mVfS1ZNveCHYqwrBq35e7JN9cDowucQM/view?usp=sharing](https://drive.google.com/file/d/1mVfS1ZNveCHYqwrBq35e7JN9cDowucQM/view?usp=sharing)

I don’t think I can share the project files given I’m not the creator. If I’m wrong, I’m willing to share those too. Or make them yourselves from marketplace.

I tried the same procedure on “Factory Environment Collection” on the marketplace with similar results. Performance was worse (28 fps → 24 fps). Also there seems to be an issue with lots of mesh loading the wrong texture. But that’s another topic.

What am I missing or doing wrong here? I was expecting a performance increase, not decrease.

---

<div class="post-metadata">

**Author:** ![didel23](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@didel23](https://forums.unrealengine.com/u/didel23)\
**Post date:** [June 4, 2021, 11:15am UTC](https://forums.unrealengine.com/t/how-to-optimize-nanite-enabled-mesh/233444/2 "2021-06-04T11:15:48Z")

</div>

nanite is used for really high poly meshes. those static meshes that you have used are optimized low poly meshes so whats the point? also nanite does some things behind the scene that adds overhead. so it allows the use of high poly meshes in real time but at a fraction of the cost.

“I later enabled virtual shadows, rebuilt lighting, and packaged that as well”  
what do virtual shadows have to do with baked lighting?

---

<div class="post-metadata">

**Author:** ![hallatore](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/hallatore/32/1109226_2.png) [@hallatore](https://forums.unrealengine.com/u/hallatore)\
**Post date:** [June 4, 2021, 11:25am UTC](https://forums.unrealengine.com/t/how-to-optimize-nanite-enabled-mesh/233444/3 "2021-06-04T11:25:45Z")

</div>

The performance increase comes from Nanite being more about pixels on screen, and less about triangle count. If your triangle count is ok to begin with, then Nanite won’t do much other than add some overhead.

---

<div class="post-metadata">

**Author:** ![crystal6tak](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@crystal6tak](https://forums.unrealengine.com/u/crystal6tak)\
**Post date:** [June 4, 2021, 11:26am UTC](https://forums.unrealengine.com/t/how-to-optimize-nanite-enabled-mesh/233444/4 "2021-06-04T11:26:21Z")

</div>

I was hoping the number of repeated mesh would give nanite the advantage. But if even in a more complex scene (The factory environment) with 937,393 triangles and 9,164,979 sum triangles. It’s still unable to gain the advantage. I guess nanite has a more specific use case than I thought. (unless again, I’m doing something wrong)

The editor was giving me warnings that nanite is best used with virtual shadows, not normal shadow mapping. Given I don’t know exactly what virtual shadows do, I gave it a light build just in case. Is that not necessary? I honestly don’t know.

---

<div class="post-metadata">

**Author:** ![hallatore](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/hallatore/32/1109226_2.png) [@hallatore](https://forums.unrealengine.com/u/hallatore)\
**Post date:** [June 4, 2021, 11:30am UTC](https://forums.unrealengine.com/t/how-to-optimize-nanite-enabled-mesh/233444/5 "2021-06-04T11:30:39Z")

</div>

If you look at yesterdays livestream they show of the first Nanite demo. The demo hovers around 20,000,000 triangles in most scenes, but the actual source amount is in the billions.

I think the scene complexity you are testing on is too low for Nanite to shine. It works, but so does the old way of doing it.

PS: Virtual shadow maps works better with Nanite because they leverage the nanite structure to build shadows. Other technics need to use the nanite proxy mesh or distance fields.

---

<div class="post-metadata">

**Author:** ![hallatore](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/hallatore/32/1109226_2.png) [@hallatore](https://forums.unrealengine.com/u/hallatore)\
**Post date:** [June 4, 2021, 11:32am UTC](https://forums.unrealengine.com/t/how-to-optimize-nanite-enabled-mesh/233444/6 "2021-06-04T11:32:44Z")

</div>

Nanite actually works fairly well regardless of repeated (instances) meshes or unique ones. That is one of the cool features about it. Nanite uses 1 draw call per material, not per unique mesh.

---

<div class="post-metadata">

**Author:** ![crystal6tak](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@crystal6tak](https://forums.unrealengine.com/u/crystal6tak)\
**Post date:** [June 4, 2021, 11:58am UTC](https://forums.unrealengine.com/t/how-to-optimize-nanite-enabled-mesh/233444/7 "2021-06-04T11:58:27Z")

</div>

I see, so as I understand it, it’s still better to use traditional static mesh in some cases then.

The [unreal documentation](https://docs.unrealengine.com/5.0/en-US/RenderingFeatures/Nanite/) says “Nanite should generally be enabled wherever possible. Any Static Mesh that has it enabled will typically render faster, and take up less memory and disk space.”. So I was under the impression these scenes would benefit as well.

---

<div class="post-metadata">

**Author:** ![Trent\_4](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Trent\_4](https://forums.unrealengine.com/u/Trent_4)\
**Post date:** [June 4, 2021, 11:59am UTC](https://forums.unrealengine.com/t/how-to-optimize-nanite-enabled-mesh/233444/8 "2021-06-04T11:59:38Z")

</div>

I agree, a bit confusing. Are we doing something wrong? Cause in many cases performance isn’t improved.

---

<div class="post-metadata">

**Author:** ![Haoris](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Haoris](https://forums.unrealengine.com/u/Haoris)\
**Post date:** [June 4, 2021, 1:32pm UTC](https://forums.unrealengine.com/t/how-to-optimize-nanite-enabled-mesh/233444/9 "2021-06-04T13:32:24Z")

</div>

I noticed with “stat gpu” command that “nanite instance culling” is taking a lot of time, sometimes becoming the heaviest gpu pass, sometimes way out of budget (like 30ms for this pass).  
I don’t know how this culling works but I think that’s because nanite is still an experimental features and will get a lot of fix in the next monthes .

---

<div class="post-metadata">

**Author:** ![Riggs](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Riggs](https://forums.unrealengine.com/u/Riggs)\
**Post date:** [June 4, 2021, 4:46pm UTC](https://forums.unrealengine.com/t/how-to-optimize-nanite-enabled-mesh/233444/10 "2021-06-04T16:46:44Z")

</div>

The point is nanite makes any mesh like 7 times lighter on disk, and is supposed to draw it more efficently, it doesn´t matter if its high poly or a more optimized low poly, they said on the last stram that nanite must be used as much as possible, and the documentation say it too, so this shuld not happen.

---

<div class="post-metadata">

**Author:** ![JohnADaniels](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/johnadaniels/32/1080686_2.png) [@JohnADaniels](https://forums.unrealengine.com/u/JohnADaniels)\
**Post date:** [June 6, 2021, 1:47am UTC](https://forums.unrealengine.com/t/how-to-optimize-nanite-enabled-mesh/233444/11 "2021-06-06T01:47:07Z")

</div>

Here is a video that shows Nanite working on a real world case:

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/c/f/8cfdf6d15f269370edd1df8f7ddecfd6abbc0724.jpeg "Unreal Engine 5 Hands On First Look at Nanite, Early Access Review") ](https://www.youtube.com/watch?v=fauYdKKt3F0)

---

<div class="post-metadata">

**Author:** ![crystal6tak](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@crystal6tak](https://forums.unrealengine.com/u/crystal6tak)\
**Post date:** [June 6, 2021, 2:22am UTC](https://forums.unrealengine.com/t/how-to-optimize-nanite-enabled-mesh/233444/12 "2021-06-06T02:22:47Z")

</div>

Looks about the same as all the other youtube videos demonstrating Nanite. Loads a high poly model without LOD optimization and compared it with nanite.

From the discussions, I think the current summary is this:

> Use nanite when:  
> -The object is large enough the player can be sufficiently close to see details while the edge of the model is far away enough that rendering the extra detail is not contributing to image quality. (ie. A very large rock)  
> -The object is highly detailed and repeated a lot in a scene to a point where it reaches 20 million rendered triangles.  
> -The object visually requires perfect detail transitions. No LOD swap should be visibly seen.  
> Otherwise, the overhead isn’t worth it and models should stick to being optimized with LODs.

If anything I said is wrong, feel free to correct me!

---

<div class="post-metadata">

**Author:** ![decksounds13](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@decksounds13](https://forums.unrealengine.com/u/decksounds13)\
**Post date:** [June 23, 2021, 4:20pm UTC](https://forums.unrealengine.com/t/how-to-optimize-nanite-enabled-mesh/233444/13 "2021-06-23T16:20:24Z")

</div>

Put a few hundred milliion polys in a scene in 4.26 and UE5 and you will understand the advantages of Nanite.

It scales incredibly well with scene complexity… which is perfect because I’m the type of person that always wanted to put millions/billions of polygons in a scene.

---

<div class="post-metadata">

**Author:** ![Roadified](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/roadified/32/566435_2.png) [@Roadified](https://forums.unrealengine.com/u/Roadified)\
**Post date:** [June 10, 2022, 11:27am UTC](https://forums.unrealengine.com/t/how-to-optimize-nanite-enabled-mesh/233444/14 "2022-06-10T11:27:01Z")

</div>

I also see no difference when using or not using Nanite. Framerate is identical. My scene has 5 million triangles. I think it should still do the difference. Many scenes simple don’t need many polygons.

I wonder if there is a parameter that controls Nanite effect based on distance? e.g. - further polys would be reduced more based on this scalar.

---

<div class="post-metadata">

**Author:** ![SantaClau5](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SantaClau5](https://forums.unrealengine.com/u/SantaClau5)\
**Post date:** [September 21, 2022, 5:15am UTC](https://forums.unrealengine.com/t/how-to-optimize-nanite-enabled-mesh/233444/15 "2022-09-21T05:15:07Z")

</div>

Im having same issues. Im using low poly assets and im getting 35 fps on 2080 and Ryzen 9 5900X. if i switch to DirectX 11, im getting 70-80 fps.

---

<div class="post-metadata">

**Author:** ![TheKJ](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TheKJ](https://forums.unrealengine.com/u/TheKJ)\
**Post date:** [August 10, 2023, 9:24am UTC](https://forums.unrealengine.com/t/how-to-optimize-nanite-enabled-mesh/233444/16 "2023-08-10T09:24:04Z")

</div>

BUMP.  
It’s obvious from Fortnite’s performance, _an **Epic Games** production_. And from other games utilizing Nanite. The performance will always be worse vs LOD optimization.

What we really need is the **auto LOD algorimth** to resemble Nanites scale down method. And a better dither effect. **This temporal dither looks so bad.**

If FN and City Sample (with no AI) run the same **LOW FPS** with the same settings.  
As I tested for myself by changing the City Samples project settings to the most optimized settings I found in FN). Which was 51fps native 1080p on a RTX 3060  
(no potato card here). That’s with no Motion blur, AA method, or any postprocess on high “60fps” lumen.

\*\*It shows Nanite is not 60fps friendly unless you use an horrible, ghosting temporal upscaler on current gen hardware \*\*

So wtf would I use Nanite for “detail”?

- Certainly not for “performance”

- Or “seamless LOD transition” since I can probably make my own dither effect for regular LODs.

The only reason to use this, is if you are a lazy developer who want to slap on DLSS to fix your problems. Thats it.

Of course million polygon assets are going to render better with Nanite. But the fact is you don’t need one million polygons assets. And **most assets shouldn’t.**

Nanite is not a magic wand. You can get great looking assets using lower poly meshes with small multi tiled textures. Warframe is a great example of that. Also, textures have far less Aliasing then high poly meshes.

---

<div class="post-metadata">

**Author:** ![TheKJ](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TheKJ](https://forums.unrealengine.com/u/TheKJ)\
**Post date:** [August 16, 2023, 11:01pm UTC](https://forums.unrealengine.com/t/how-to-optimize-nanite-enabled-mesh/233444/17 "2023-08-16T23:01:51Z")

</div>

> Put a few hundred milliion polys in a scene in 4.26 and UE5

Cough Cough, [5 million](https://forums.unrealengine.com/t/nanite-performance-is-not-better-fix-your-documentation-epic-youre-ruining-games/1263218) **without Nanite**  **does better** than with **Nanite turned on**.

---

<div class="post-metadata">

**Author:** ![Shiv0r](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/shiv0r/32/483716_2.png) [@Shiv0r](https://forums.unrealengine.com/u/Shiv0r)\
**Post date:** [August 16, 2023, 11:27pm UTC](https://forums.unrealengine.com/t/how-to-optimize-nanite-enabled-mesh/233444/18 "2023-08-16T23:27:28Z")

</div>

Cap. Also in combination with lumen, vsm it will perform much worse than with nanite enabled.

---

<div class="post-metadata">

**Author:** ![TheKJ](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TheKJ](https://forums.unrealengine.com/u/TheKJ)\
**Post date:** [August 16, 2023, 11:35pm UTC](https://forums.unrealengine.com/t/how-to-optimize-nanite-enabled-mesh/233444/19 "2023-08-16T23:35:04Z")

</div>

Turning off VSM’s when it was nanite or not always helped perf.  
But I feel like VSM are worth it due to the more realistic look they can give to a game environment.
