Hello Unreal community! I’m trying to work with a large mesh from RealityCapture (around 105 million triangles). It imports successfully and renders in the editor fine (the first time) with nanite enabled. However, when I save the project and then quit / reload, Unreal Editor crashes every time. I see this just before the crash:
[2024.07.24-15.03.50:378][614]LogAsyncCompilation: Display: BEWARE: AssetCompile memory estimate is greater than available, but we're running it [StaticMesh] anyway! RequiredMemory = 0.000 MiB + 162305.546875 MiB, MemoryLimit = 112266.609375 MiB
and then the crash log:
[2024.07.24-15.27.04:570][530]LogOutputDevice: Error: === Handled ensure: ===
[2024.07.24-15.27.04:570][530]LogOutputDevice: Error: Ensure condition failed: NewArrayNum >= 0 && std::numeric_limits<SizeType>::max() / (SizeType)ElementSize >= NewArrayNum [File:D:\build\++UE5\Sync\Engine\Source\Runtime\Core\Public\Containers\Array.h] [Line: 1307]
Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x00007ffbe86b6cb0
0x00007ffa7bc496e7 UnrealEditor-MeshDescription.dll!UnknownFunction []
0x00007ffa82a00235 UnrealEditor-Engine.dll!UnknownFunction []
0x00007ffa7083efb6 UnrealEditor-MeshBuilder.dll!UnknownFunction []
0x00007ffa81561b73 UnrealEditor-Engine.dll!UnknownFunction []
0x00007ffa8546ef83 UnrealEditor-Core.dll!UnknownFunction []
0x00007ffa80da2014 UnrealEditor-Engine.dll!UnknownFunction []
0x00007ff616609edf UnrealEditor.exe!UnknownFunction []
0x00007ffa856702b7 UnrealEditor-Core.dll!UnknownFunction []
0x00007ffafbe5257d KERNEL32.DLL!UnknownFunction []
It seems like Unreal is running out of memory trying to load the nanite asset- my machine has 128 GB of physical RAM but loading estimates needing around 162 GB and I guess Unreal doesn’t use the virtual memory I have reserved (is there some way to change that?)
Is there some step I’ve missed for working with large nanite meshes? Do I need to first break it up into smaller pieces so they can be built separately? Any tips would be greatly appreciated!