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
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
Any more ideas, please?
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!
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?
Hello @Jimbohalo10 , thank you for your response.
I’ve added the line on the file but without success, maybe(probably) I am missing something.
Can you help me go deeper?
@ricardo.zimmerma, I know what’s wrong now I followed the Lighting documentation page and when you add light you need to keep doubling until all the nanite elements are loaded into your picture because I am missing lots of static meshes.
Looking at the code this may mean 2048 * 16 or higher = 32,768
even higher is 2048 * 32 = 65,536 this is the maximum for an signed 16bit integer.
Could try 131072 which would be the top for an unsigned 32-bit integer
You will have a big 64GB pagefile.sys like me to load all this. This would imply the number of Nanite.Streaming pages is not increasing and has to be set at the start.
May be you will only need this during and import conversion
The source code does not document this as supposed may be secret to Epic at the moment
Hi again @Jimbohalo10 ,
I’ve tried to import the datasmith file without lights and still crashed on 12288 assets.
Maybe I’m not understanding you well.
Do you think I need to allocate virtual memory again?
Also, building UE5.1 from source would fix the issue?
So many questions(sorry), but I’m really struggling with this.
You will need to try with the MAXIMUM value
also to add 64GB virtual emory.
You can add this using How to add a larger page file use 64GB
UPDATE have you seen/tried
The initial value is 512 which is small!!
After building the newest version from source I could add more than the original maximum number of assets(12287). After copying some assets I was able to have 14k+ assets with nanite enabled…
It seems that they fixed the issue. After some more tests I’ll update the topic.