Packaged game with World Partition level crashes from high memory usage

I think I’m missing how to cook/package a World Partition map. When I cook using the cli commandlet and then package from the editor, launching the packaged game consumes an extremely high amount of memory (more than 64GB) and then crashes before loading the level.

Following the UE5 docs for World Partition here: World Partition in Unreal Engine | Unreal Engine 5.1 Documentation

All I’ve done is:

  • Created a demo project based on the Open World level template
  • Imported a large landscape (16k split into tiles)
  • Assigned a basic landscape material
  • Generated World Partition minimap and HLODs
  • Cooked the level using the command line cooker
  • Packaged from inside the editor

This all runs well in the editor and PIE, no issues there. But when the map is cooked and packaged it appears to try loading everything all at once.

Does anyone know if there is a better way to do this or what might be going wrong? Should I use UAT for packaging instead?

Hey there @mvitech! Welcome back to the community! This sounds like quite a wild one. Even without being configured correctly, everything being committed to memory all at once before load is quite an outlier.

Let’s verify if it’s a resource issue or a WP issue first and foremost. Create an empty scene with maybe a plane to walk on as your intro scene, and a method to change to the largescale WP level somewhere in it. If you can successfully load the temp level but crash when going to the real level, it might be that every object isn’t spatially loaded, thus being committed to memory as it would need to be rendered as the player spawned looking in that direction.

Do you have any kind of proc gen system that could be accessing lots of resources all in one frame? I don’t think it’d be nearly that bad but I’ve seen some pretty high numbers.

Hey, thanks for the reply. I think this was fixed by switching the Targeted RHI to DirectX 11. Before doing that, I actually couldn’t even load the level in PIE - Separate Window mode, or the same crash would happen.

Edit: After testing more builds this was in fact caused by THE HLODs :scream:

According to 5.1 docs, landscapes are not supported by HLOD actors. I had run World Partition > Build HLODs without changing anything, so it pulled in the massive landscape. I suppose landscape actors have to be excluded from the HLOD layers.

Said docs: World Partition - Hierarchical Level of Detail in Unreal Engine | Unreal Engine 5.1 Documentation

2 Likes

Ahhh HLOD’s were going to be my next guess, they immediately take their place in memory, which now makes a massive amount of sense. Awesome work!

1 Like