In this lesson, you’ll learn how to initialize and configure World Partition to handle massive open-world environments through automatic, grid-based streaming and memory management.
As you build increasingly complex, large-scale maps, standard level-loading techniques fail because they attempt to load the entire environment into memory. World Partition solves this by dividing your world into a discrete, spatial grid. Instead of manual level streaming, the engine dynamically loads and unloads these grid cells based on the camera’s proximity, drastically reducing the memory footprint.
Initializing World Partition
When starting a new project intended for large environments, you should enable World Partition during the creation process. If you are converting an existing level, you can utilize the Convert Level command in the World Settings. Once enabled, the level acts as a single, persistent world space.
Configuring the Grid
The primary configuration for your world happens within the World Settings under the World Partition Setup section. Here, you define the Grid Size and Cell Size.
- Grid Size: Determines the resolution of the spatial hash.
- Cell Size: Defines the actual bounds of each streaming unit.
Smaller cell sizes provide finer-grained control over memory (only loading exactly what is needed), while larger cell sizes reduce the overhead of loading many tiny assets simultaneously.
Managing Data Layers
While the grid manages spatial streaming, you should use Data Layers to manage logic-based streaming (e.g., loading different biome versions or quest-specific environmental changes). By assigning actors to specific Data Layers, you allow the World Partition system to filter which objects are considered for streaming based on runtime state, even if they occupy the same spatial grid cell.
To verify your setup, always use the World Partition Editor window. It provides a visual heatmap of your loaded cells, helping you identify if your grid settings are too aggressive (causing frequent loading hitches) or too loose (leading to high memory consumption). By balancing your cell resolution against the density of your object placement, you ensure a consistent memory budget across your target platform.
Key Takeaway: World Partition moves the responsibility of memory management from the designer to the engine, using a spatial grid to automatically stream only the assets required by the player’s current position.