Building large maps used to require developers to manually divide maps into sublevels, then use the level streaming system to load and unload them as the player traversed the landscape. This method often created issues sharing files between multiple users, and viewing the whole world in context became a difficult task.
World Partition is an automatic data management and distance-based level streaming system that provides a complete solution for teams looking for a large world management solution. The system removes the previous need to divide large levels into sublevels by storing your world in a single persistent level separated into grid cells, and provides you with an automatic streaming system to load and unload those cells based on distance from a streaming source.
Adding World Partition to small levels where level streaming is not needed may add additional performance costs.
World Partition works closely with the following features:
Enabling World Partition
You can enable World Partition in the following ways:
Creating a new project from a template in the Games category.
Creating a new level using the Open World template.
Converting existing levels to use World Partition.
Setting project defaults so that new levels created in the Content Browser use World Partition.
Creating Your Project Using a Games Template
World Partition is enabled by default in many of the project templates found in the Games category.
To reduce complexity and provide a scalable solution when creating new projects, grid cell streaming can be toggled on and off using the Enable Streaming option in the World Settings.
The first time you enable streaming on a level, the editor asks you to confirm, then creates a Runtime Hash Set with a single main partition. For more information, see Runtime Grid Settings below.
When streaming is disabled and the spatially loaded content in the level grows beyond the extent set by wp.Editor.WorldExtentToEnableStreaming (400,000 cm by default), the viewport shows a Streaming Disabled warning. To hide the warning for a level, turn on the Hide Enable Streaming Warning option in the World Partition Setup section of the World Settings.
The following templates use World Partition but have Enable Streaming disabled by default:
Blank
First Person
Third Person
Top Down
Vehicle Advanced
Using the Open World Default Map
The Open World map type is designed to be a starting point for creating large open-world maps and comes with the following features enabled by default:
World Partition
One File Per Actor
Data Layers
Hierarchical Levels of Detail
The map contains a sample 2 km x 2 km landscape with a landscape material and lighting setup for an outdoor environment. This includes a sky atmosphere, skylight, directional light, exponential height fog, and volumetric clouds.
To use the Open World default map type within your project:
Open the File menu and select New Level.
Select the Open World map type.
Click the Create button to create a new map.
Converting Existing Levels to Use World Partition
You can convert an existing level to World Partition in the editor with Tools > Convert Level..., or from the command line using the WorldPartitionConvertCommandlet.
To run the commandlet from the command line, use the following form:
UnrealEditor.exe Project -run=WorldPartitionConvertCommandlet Map.umap -AllowCommandletRenderingThe builder requires the following arguments:
Projectis the name of the project.-run=WorldPartitionConvertCommandletnames the commandlet to run.Map.umapis the map file to convert.-AllowCommandletRenderinginitializes the rendering subsystem
The builder also has the following optional arguments:
| Optional Arguments | Description |
|---|---|
| Writes the result to a new map with a |
| Deletes the source sublevels after conversion. |
| Writes a default conversion .ini next to the map and stops. |
| Reports what the conversion would do without converting. |
| Writes verbose output to the log. |
| Merges the sublevels into one OFPA level without enabling World Partition (for use as a Level Instance). |
| Converts with streaming disabled on the resulting World Partition. |
| Skips the check for unstable actor GUIDs. |
| Extracts embedded foliage types to assets at the given path. |
The Convert Level... menu option builds the commandlet arguments for you and has the following options:
In Place
Skip Stable GUID Validation
Delete Source Levels
Generate Ini
Report Only
Verbose
Only Merge
Sub Levels
Save Foliage Types
Setting World Partition Defaults for New Levels
Project-wide defaults for new maps are in Edit > Project Settings > Engine > World Partition:
| Option | Description |
|---|---|
New Maps Enable World Partition | Whether new maps created in the Content Browser use World Partition. Disabled by default. |
New Maps Enable World Partition Streaming | Whether new World Partition maps created in the Content Browser have streaming enabled. Enabled by default. |
New Maps Data Layers Logic Operator | The default logic operator for Data Layer activation on new maps. Or by default. For more information, see World Partition - Data Layers. |
Runtime Hash Default Class | The runtime hash class for new maps. World Partition Runtime Hash Set by default. For more information, see Runtime Grid Settings below. |
Using World Partition
The World Partition system works by storing your world as a single persistent level that contains all the non-spatially loaded actors (always loaded actors). It then splits the world into multiple streamable cell levels generated from a configurable runtime grid, which hold the spatially loaded actors (actors loaded by a streaming source). These cells are loaded and unloaded at runtime by the presence of streaming sources, such as the player. In this way, Unreal Engine only loads the parts of the level that the player sees and interacts with at a given time.
World Partition cells have three states and adhere to the following hierarchy:
Unloaded: The content is not in memory and not visible.
Loaded: The content is in memory but not visible. The cell’s actors exist in the world but do not tick or collide.
Activated: The content is in memory and visible in the world. The cell’s actors tick and collide.
The Loaded state is used to stage content and pay its performance costs early, making the switch to the Activated state cheaper.
The state of a World Partition cell is determined by nearby streaming sources. However, two options are available that can override this:
Is Spatially Loaded: This option is available on most actors and causes it to ignore streaming sources if disabled.
Data Layers: The state of a data layer can override the state of a streaming cell. For example, an actor that is in a cell that is activated by a streaming source but is part of a data layer that is currently set to Unloaded will not be loaded. For more information about Data Layers, see World Partition - Data Layers.
Streaming Sources
Streaming of grid cells within the grid at runtime is determined by two factors:
Streaming Sources
Runtime Grid Settings
The first is the position of streaming sources in the level.
Streaming sources are components that define a position in the world and trigger the loading of cells around them. Player controllers are streaming sources. Other streaming sources can be added to the world using the World Partition Streaming Source component.
For example, a streaming source component can be activated at the location that a player teleports to, so it can load the cells there. Once the grid cells are loaded, the player teleports to the location and the streaming source component is deactivated. Since there is no longer a streaming source at the player's previous location, those grid cells are unloaded.
Streaming-source loading ranges are subject to an optional editor-only Play In Editor (PIE) scale. For more information, see Dynamic Loading Range Scaling.
Using the Player as a Streaming Source
Each player controller is a World Partition streaming source when its Enable Streaming Source option is enabled, which is the default. The World Partition section of the player controller's Details panel has the following options:
| Option | Description |
|---|---|
Enable Streaming Source | Whether the Player Controller is used as a World Partition streaming source. |
Streaming Source Should Activate | Whether the streaming source activates cells after loading them, or only loads them. |
Streaming Source Should Block On Slow Streaming | Whether the streaming source blocks (stalls the game thread) when cells are not loading fast enough. |
Streaming Source Priority | The priority of this streaming source, from Highest to Lowest. Normal by default. |
Streaming Source Debug Color | The color used for this streaming source in debug displays. |
Streaming Source Shapes | An optional list of shapes used to build a custom shape for the streaming source. When empty, the source uses a sphere with a radius equal to the loading range of the partition. |
By default, the streaming source follows the Player Controller's pawn. Set wp.Runtime.PlayerController.ForceUsingCameraAsStreamingSource to 1 to use the camera instead. In the editor, the Simulate camera is also a streaming source unless wp.Runtime.EnableSimulationStreamingSource is set to 0.
Using the World Partition Streaming Source Component
World Partition streaming is also done using the World Partition Streaming Source component:
This component has the following options:
| Option | Description |
|---|---|
Default Visualizer Loading Range | Determines the size of the debug visualizer grid when the visualizer is enabled. |
Target Grids | An optional list of runtime partitions affected by this source. Leave the list empty to affect every partition. You can also name HLOD partitions here. For more information on using HLODs with World Partition, see World Partition - Hierarchical Level of Detail. |
Target Behavior | Whether the partitions listed in Target Grids are the only ones affected by this source (Include) or the only ones excluded (Exclude). |
Debug Color | Determines the color used for debugging. |
Shapes | The shape list used to build a custom shape for this streaming source. If empty, the source uses a sphere with a radius equal to the loading range of the partition. |
Priority | The priority of the streaming source. If a grid cell intersects multiple streaming sources, its priority is the highest priority among those sources. |
Streaming Source Enabled | Determines if this component is enabled. |
Target State | The state that intersecting grid cells should be in: either Loaded or Activated. If a grid cell intersects multiple streaming sources, its target state is the highest requested state, where Activated is higher than Loaded. |
The Blueprint functions Enable Streaming Source and Disable Streaming Source enable and disable streaming with this component.
The Blueprint function Is Streaming Completed returns true when the component has finished streaming the grid cells that it intersects with.
Runtime Grid Settings
The second factor that determines whether a grid cell is loaded or unloaded at runtime is the runtime partition settings. These settings are in the World Settings panel, in the Runtime Settings subsection of World Partition Setup. Each entry in Runtime Partitions has the following options:
| Option | Description |
|---|---|
Name | The name of the runtime partition. Actors target a partition by this name through their Runtime Grid setting. |
Main Partition | The partition object and its type. The default type is Loose Hierarchical Grid, whose settings are listed below. |
HLOD Partitions | One entry per HLOD Layer in the hierarchy. Each entry has a name, the HLOD Layers To Include, and its own partition settings. For more information, see World Partition - Hierarchical Level of Detail. |
Cell Size | The size of the smallest grid cells used to generate the streaming levels. 12,800 cm by default. |
Loading Range | The range from a streaming source within which cells are loaded. 25,600 cm by default. |
Is 2D | When enabled, cells are placed in two dimensions and extend over the full height of the world. Enabled by default. Disable it for worlds that need 3D cell placement. |
Origin | The world position of the grid origin. |
Bounds Method | How the bounds of a cell are calculated: |
Block on Slow Streaming | Blocks loading when the cells of this partition are not loading fast enough. Disabled by default. |
Client Only Visible | When enabled, the cells of this partition are only streamed on clients, not on a dedicated server. |
Priority | The priority of the cells in this partition when cells are sorted for streaming. Higher values load first. 0 by default. This is a cell priority, separate from the priority of a streaming source. |
Debug - Grid Color | The color of the grid lines that are shown when Debug - Show Grid Preview is enabled. |
Debug - Show Grid Preview | When enabled, displays the grid lines of this partition in the viewport. |
New worlds use the World Partition Runtime Hash Set runtime hash class by default. Its Runtime Partitions list contains one main partition which uses a Loose Hierarchical Grid with a cell size of 12,800 cm and a loading range of 25,600 cm. A Loose Hierarchical Grid is made of a stack of grid levels. Level zero uses the partition's Cell Size and each level above it doubles the cell size.
The World Partition Runtime Hash Set also supports both 2D and 3D grids. Turning off the Is 2D option on a partition places its cells in 3D space instead of extending them up to the full height of the world.
Each partition can also have HLOD partitions.
The legacy World Partition Runtime Spatial Hash remains available through the Runtime Hash Class dropdown menu.
Start with a single partition; using more than one partition can negatively impact performance.
When World Partition generates streaming for a PIE session or during the cook process, every spatially loaded actor is assigned to one cell of its runtime partition. The system places an actor on the lowest level whose cell size is at least the largest dimension of the actor's bounds and then in the cell on that level that contains the center of those bounds. When the Is 2D option is enabled, only the X and Y dimensions of the actor are used.
Because the hierarchical grid places an actor using its center rather than the full bounding box, an actor can extend past the edges of its cell by up to half the cell’s size. This is what makes the grid loose. An actor that spills out of the lower level's cell by less than a quarter of the Cell Size stays on the lower level. The Use Content Bounds Method streams each cell based on the bounds of the actors it holds.
Actors that reference each other are placed together using their combined bounds, so a single far-away reference can push a whole group to a high level, where cells are large and stay loaded over a wide area.Use the wp.Runtime.HashSet.ShowDebugDisplayLevel console command to view which level a cell belongs to.
For an example of a working Runtime Grid setup, see the Big City map in the City Sample project. This level uses a single Loose Hierarchical Grid partition with a 12,800 cm cell size and a 12,800 cm loading range.
Runtime Cell Transformers
When World Partition generates streaming, it also applies the Runtime Cells Transformer Stack from the World Partition Setup options of the World Settings to every runtime cell, from top to bottom. A transformer rewrites the contents of a cell before the cell is saved as a streaming level, which can be used to reduce the number of actors and components that the cell loads at runtime. The stack is the main way to optimize how a World Partition level streams.
Unreal Engine provides the following transformers:
World Partition Runtime Cell Transformer ISM merges eligible static mesh actors into instanced static mesh components. Its settings control which actor classes are allowed or disallowed and the minimum number of instances required for a merge.
FastGeo World Partition Runtime Cell Transformer (provided by the FastGeo Streaming plugin) converts eligible actors into lightweight FastGeo data, which eliminates many static actor types and their components in favor of direct render proxy creation. This optimizes the process by reducing UObject lifetime churn, garbage collection pressure, and moves most of the loading work on to worker threads.
Actors that reference other actors, and Blueprint actors that contain logic, are not transformed. Keep gameplay logic in Blueprint classes and prefer soft references so that more of your content is eligible.
Actors in World Partition
The following World Partition settings in an actor's Details panel determine how the actor is assigned to a grid cell and streamed:
| Option | Description |
|---|---|
Runtime Grid | Determines the runtime partition that this actor is placed in. If None, the partition system chooses the partition. On a Runtime Hash Set world you can name a partition ( |
Is Spatially Loaded | Determines if the actor is spatially loaded: |
HLOD Layer | The HLOD Layer that this actor contributes to. For more information, see World Partition - Hierarchical Level of Detail. |
Include Actor in HLOD | Whether this actor is considered during HLOD generation. |
Data Layer Assets | The Data Layers that this actor belongs to. For more information, see World Partition - Data Layers. |
External Data Layer | The External Data Layer that this actor belongs to. This value is read-only in the Details panel; assign it from the Data Layers Outliner. |
Is Main World Only | If enabled, this actor is only loaded in a main world (the persistent level). It is not loaded through Level Instances. |
Since actors are saved to their own individual files using the One File Per Actor feature, you do not need to check out the level file from source control to make changes to the actors in the world. This frees up the level file for others on your team.
For more information on the One File Per Actor system and Unreal Engine's integrated source control, see the One File Per Actor documentation.
Actors that reference other actors in the level are bundled together and loaded at the same time. Referenced actors are also excluded from the Runtime Cell Transformers (see Runtime Cell Transformers below), so a hard reference costs both streaming granularity and transformer eligibility. Prefer soft references to nearby actors.
Loading and Unloading Regions in the Editor
To support the development of large worlds, the world is initially unloaded. When the level opens, the editor only loads actors that have Is Spatially Loaded disabled, such as environment backdrops and managers. This supports the development of large worlds where it is impossible to load the entire map in the editor.
Loading regions in the editor is controlled by the Enable Loading In Editor option in Edit > Editor Preferences > Level Editor > World Partition settings. The editor reloads the regions that were loaded when you last saved the level, unless Disable Loading Of Last Loaded Regions is enabled. The Outliner has a pin column that keeps an actor loaded regardless of the loaded regions; actors with unsaved changes are pinned automatically.
To see HLODs for unloaded regions in the editor, enable Show > HLODs in the viewport. The HLOD Min Draw Distance and HLOD Max Draw Distance editor preferences control the distances at which they are displayed.
Load and Unload Regions Using the World Partition Window
You can manually select the region to work in using the World Partition window. Open the window by selecting Window > World Partition > World Partition Editor from the main menu.
In the window, drag to select a region. Then, right-click the selection to open the context menu and select Load Region from Selection.
Load and Unload Regions Using Location Volumes
Regions can also be loaded and unloaded using Location Volumes.
A Location Volume is an editor-only volume placed into the level that represents a region of the map in the World Partition window.
To add a Location Volume to your level, follow the steps below:
Open the Place Actors window, if it is not already open.
Search for Location Volume. Drag it into your level.
Save your level.
Once the level is saved, a new region appears in the World Partition window with the same name as the Location Volume.
Select the region and right-click to open the context menu. Click Load Selected Region to load the region. Several regions can be loaded or unloaded at the same time by drag-selecting or Ctrl + clicking multiple regions.
A Location Volume has the following settings in its Details panel:
| Setting | Description |
|---|---|
Debug Color | The color used to draw the volume's region in the World Partition window. |
Load | Loads the region within the volume. |
Unload | Unloads the region within the volume. |
Save and Restore Your Editor Context Using World Bookmarks
A World Bookmark asset stores your editor state for a level, including the loaded regions, so you can return to the same working state later or share it with your team. Create one with Capture or Capture To Clipboard, and apply one with Restore or Restore From Clipboard.
Dynamic Loading Range Scaling
You can use dynamic loading range scaling to improve PIE session performance, to improve iteration time when working on large World Partition maps.
Generating a Minimap for the World Partition Window
You can generate a minimap to make navigating in the World Partition window easier. In the Build menu, select Build World Partition Editor Minimap in the World Partition section, or run the World Partition MiniMap Builder commandlet:
UnrealEditor.exe <Project> <Map> -run=WorldPartitionBuilderCommandlet -Builder=WorldPartitionMiniMapBuilder -AllowCommandletRenderingRunning this commandlet creates a minimap image of your World Partition world and places it in the World Partition window. For more information, see World Partition Builder Commandlet Reference.
If you build your minimap and it does not appear in the World Partition window, enable virtual texture support in your project. From the main menu, go to Edit > Project Settings, then enable Enable virtual texture support.
Shortcuts and Options in the World Partition Window
| Shortcut | Description |
|---|---|
Shift + Drag | Snaps the selection to the current grid snap size. |
Double-click | Moves the camera to the clicked location in all viewports. |
Shift + Double-click | Starts a PIE session at the clicked location. Not available when Disable PIE is enabled in the World Partition editor preferences. |
Ctrl + Double-click | Moves the camera to the clicked location and loads a region around it. Requires Enable Loading In Editor. |
Ctrl + Click | Adds a region to the current selection. |
MMB + Drag | Shows the distance from the clicked point to the end point in centimeters. |
Follow Player In PIE | When enabled in the window's toolbar, the view follows the player during a PIE session. |
Generating Hierarchical Levels of Detail (HLODs)
HLODs are generated using the Build HLODs option found in the World Partition section of the Build menu, or by using the World Partition HLODs Builder commandlet.
Running this commandlet creates the HLOD actors for your World Partition cells according to the settings of your HLOD Layers. On a Runtime Hash Set world, the streaming settings for HLODs (cell size, loading range, and whether they are spatially loaded) are set on the HLOD Partitions of each runtime partition, not on the HLOD Layer asset. You can also build the HLODs of a single HLOD actor from its Details panel with Build HLOD. For more information about using HLODs in World Partition and the World Partition HLODs Builder commandlet, see World Partition - Hierarchical Level of Detail.
Cooking a World Partition World
To cook a World Partition map, run the Cook commandlet from the command line. For example:
UnrealEditor.exe QAGame -run=cook -targetplatform=Windows -Unversioned -map=PlaygroundThe command uses the following arguments:
-targetplatform=Windowscooks the project for Windows. Other platform names, such asWindowsServerorWindowsClient, are also valid.-Unversionedsaves the cooked packages without versions. They are assumed to be the current version on load.-map=Playgroundspecifies the map to cook, in this casePlayground.umap.
Streaming generation, including the Runtime Cells Transformer Stack, runs as part of the cook.
For more information on using the Cook commandlet, see Content Cooking.
Using World Partition with Blueprint
Both Blueprint classes and Level Blueprints are supported in a World Partition world. Blueprint classes are recommended, as any actors referenced in the Level Blueprint are marked as Always Loaded. Blueprint actors that contain logic are also excluded from the Runtime Cell Transformers.
Debugging and Runtime Overrides
There are several useful console commands for debugging a World Partition world during runtime.
| Console Command | Description |
|---|---|
wp.Runtime.ToggleDrawRuntimeHash2D | Toggles 2D debug display of world partition runtime hash. |
wp.Runtime.ToggleDrawRuntimeHash3D | Toggles 3D debug display of world partition runtime hash. |
wp.Runtime.ShowRuntimeSpatialHashGridLevel | Chooses which grid level to display when showing the runtime hash. Spatial Hash worlds only. |
wp.Runtime.ShowRuntimeSpatialHashGridLevelCount | Chooses how many grid levels to display when showing the runtime hash. Spatial Hash worlds only. |
wp.Runtime.FilterRuntimeSpatialHashGridLevel | Shows a specific grid level when showing the runtime hash. Spatial Hash worlds only. |
wp.Runtime.HashSet.ShowDebugDisplayLevel | Chooses which grid level to display when showing the runtime hash. Runtime Hash Set worlds only. |
wp.Runtime.HashSet.ShowDebugDisplayLevelCount | Chooses how many grid levels to display when showing the runtime hash. Runtime Hash Set worlds only. |
wp.Runtime.HashSet.ShowDebugDisplayMode | Chooses the debug display mode for the runtime hash. Runtime Hash Set worlds only. |
wp.Runtime.DebugFilterByRuntimeHashGridName | Limits the debug display to the named runtime partition. |
wp.Runtime.RuntimeSpatialHashCellToSourceAngleContributionToCellImportance | Takes a value between 0 and 1 that modulates the contribution of the angle between streaming source-to-cell vector and source-forward vector to the cell importance. The closer the value to 0, the less the angle will contribute to the cell importance. |
wp.Runtime.OverrideRuntimeSpatialHashLoadingRange | Sets the runtime loading range on a Spatial Hash world. Takes the following arguments: |
wp.Runtime.OverrideRuntimeLoadingRange | Sets the runtime loading range on a Runtime Hash Set world. Not available in shipping builds. Takes the following arguments: |
wp.Runtime.MaxLoadingStreamingCells | Limits the number of World Partition streaming cells that load at the same time. 4 by default. |
wp.Runtime.ToggleDrawStreamingSources | Toggles the debug display of streaming sources. |
wp.Runtime.ToggleDrawStreamingPerfs | Toggles the streaming performance display. |
wp.Runtime.ShowRuntimeSpatialHashCellStreamingPriority | Shows the streaming priority of each cell in the debug display. |
wp.Runtime.DumpStreamingSources | Writes the current streaming sources to the log. |
wp.Runtime.HLOD | Set to |
World Partition Builder Commandlets
World Partition introduces a builder commandlet framework through the UWorldPartitionBuilderCommandlet and the UWorldPartitionBuilder base class.
These commandlets automate batch processes that generate or modify data in World Partition levels, such as generating HLODs or navigation data, or resaving a large number of actors, without loading the whole world at once. Unreal Engine ships more than fifteen builders, including builders for HLODs, the minimap, navigation, foliage, landscape, static lighting, and actor resaving. A builder can run on a single map, a list of maps, a directory, or a Collection.
For more information on using World Partition Builder Commandlets, see World Partition Builder Commandlets Reference.