Can´t enable nanite for more than 12287 assets

Hello, I am trying to create a 4D construction simulation on UE5 using nanite because of revit’s large model. I can enable nanite on exactly 12287 assets, but when I try to enable on one more asset, unreal crashes

Assertion failed: NumAllocatedRootPages >= (uint32)RootPages.Allocator.GetMaxSize() [File:D:/build/++UE5/Sync/Engine/Source/Runtime/Engine/Private/Rendering/NaniteStreamingManager.cpp] [Line: 1108]

Dropbox link to my datasmith file:

I remember nanite had a few millions of triangle limit, which was denoted in docs. You may be hitting that limit.

Hi @ricardo.zimmerma , @dyanikoglu, @fw190a8 anyone who is investigating. In the latest post.

The original any my other answers are no longer valid

Can´t enable nanite for more than 12287 assets post 10 SOLVED

Hi @Jimbohalo10 ,
Thanks for your reply. I felt really dumb reading it as I didn’t understand very much. I have a revit/bim/dynamo background and only now I’m starting to adventure myself in the land of unreal.
My datasmith file is directly imported from revit, so I don’t really understand those errors.
Can you please explain better, if not asking too much?
My pc specs are:
CPU Ryzen 3900x
GPU RTX 3070 Vision
Memory 32 gb 3600mhz cl17
Windows 64 bits
1tb ssd mp600

HI @ricardo.zimmerma,
see the solved post Can´t enable nanite for more than 12287 assets to see POST 10 SOLVED

Even though your PC is much better spec than my PC still think you will need a 64 Gigabyte page file as Unreal 5 is such a hungry resource

I documented the installation of the pagefile.sys
Install windows 10 pagefile.sys

Hi @Jimbohalo10 , thanks again for replying…
I’ve allocated 64gb of virtual memory.

After restarting my pc I’ve managed to enable nanite on a few more assets but after 100~ assets, unreal crashed again and now I can’t even open the project anymore :sweat_smile:
Any more ideas, please?

Hi @ricardo.zimmerma,

They had a similar problem in another post
Assertion failed - WorldPartition error on startup

Hi @Jimbohalo10,
the topic you mentioned was about restoring a broken project, right?
I don’t need to restore the project as I’ve tried to open in a blank template and got the same results.
My problem is that I can’t enable nanite on all assets and therefore I’m having massive fps drops because of the dense model

It’s a slightly different issue Jim although the errors do look very similar! Just in case anyone uses these threads in the future, I thought I’d just post to confirm that they’re not related! :slight_smile:

Hi @ricardo.zimmerma,
Well after a lot of investigation in the source code for UE5 I found how to fix this .
This is my log of Datasmith import
LogLayoutUV: FindBestPacking (Total Time: 0 ms, Avg Efficiency: -nan(ind))
LogUObjectHash: Compacting FUObjectHashTables data took 27.69ms

*LogDatasmithImport: Imported CENTRAL_MODEL_AUDAX_MARCELO_E_BEA_BRAND_NEW_ricar-3DView-3D-ricar in [0 min 31.646 s] [Private Bytes: 4.34 GB, Working Set 3.43 GB, Peak Working Set 3.51 GB]

LogShaderCompilers: Display: === FShaderJobCache stats ===
LogShaderCompilers: Display: Total job queries 917, among them cache hits 0 (0.00%)
LogShaderCompilers: Display: Tracking 763 distinct input hashes that result in 587 distinct outputs (76.93%)
LogShaderCompilers: Display: RAM used: 2.15 MB (0.00 GB) of 819.20 MB (0.80 GB) budget. Usage: 0.26%
LogShaderCompilers: Display: ================================================

In the UE5 Project start-up log we now have

LogConfig: Applying CVar settings from Section [/Script/Engine.RendererSettings] File [Engine]
LogConfig: Setting CVar [[r.GPUCrashDebugging:0]]
LogConfig: Setting CVar [[r.Nanite.Streaming.NumInitialRootPages:4096]]

The added line in C:\Users\Owner\source\repos\UE50\Engine\Config
in section [/Script/Engine.RendererSettings]

;@VS2022 Added line increase r.Nanite.Streaming.NumInitialRootPages double from 2048


Restart UE5 Editor again and new project → new level Add DataSmith Plugins
then import the file

So there it’s imported, there does not appear to be any lighting though?