Working with Unreal World Partition system
The Unreal Engine's World Partition system serves as a robust map streaming solution designed for large environments. Errant Biomes fully integrates with this system, although there are specific considerations for optimal performance and behavior.
Handling Large Actors with World Partition
Errant Biomes often generates large actors by aggregating instances from multiple species into composite instance components. These large actors pose challenges to Unreal's World Partition when it comes to placement within runtime grid cells.
To address these issues, Errant Biomes provides a specialized base actor class—ABiomesPartitionActor
. This class ensures the correct placement of large actors within the World Partition's runtime grid for Errant Biomes spawned actors.
Version Note:
The ABiomesPartitionActor
class was introduced in Errant Biomes 1.4. If your project was initiated on an earlier version, ensure that your Actor Template Class
under the species Instances Settings
has been updated to this new class.
Configuring Streaming Distance for Species
The World Partition system allows you to control when specific actor get streamed in.
This is configurable via the actor properties and for species can be found in actor template property.
There can be multiple runtime grids in the world.
Here are some examples for how to fine-tune the streaming distance for different species:
Method 1: Differentiate by Distance
Create separate runtime grids to specify the streaming distance for different types of objects.
- Close Grid: Set the loading range to 25,600 cm.
- Medium Grid: Configure a loading range of 102,400 cm.
- Far Grid: Go for an even greater distance, such as 204,800 cm.
Method 2: Differentiate by Object Types
Alternatively, you can categorize runtime grids based on the types of objects they contain.
- Ground Plants
- Trees
- Rocks
- Additional Categories (as needed)
World Partition Builder
Errant Biomes provides World Partition Builder that can be used from editor or command-line/builder to update biomes over the whole map.
Limiting generation area
You can place ABiomesWorldPartitionBuilderVolume
actors on the map to limit generation area to the area they cover.
Inside you can also specify which data layers to load during generation.
Editor
You can start the process in the editor under the Build
menu by selecting the Build Errant Biomes
option.
Command Line
Errant Landscape World Partition Builder can be run as a commandlet the same as other world partition builders. Make sure to see the Unreal Engine documentation page first.
The name of the builder is BiomesWorldPartitionBuilder
.
Here's an example following the pattern from Unreal Engine documentation:
UnrealEditor.exe "C:\Users\user.name\Documents\Unreal Projects\MyProject\MyProject.uproject" "/Game/ThirdPersonBP/Maps/OpenWorldTest" -run=WorldPartitionBuilderCommandlet -AllowCommandletRendering -builder=BiomesWorldPartitionBuilder
Options
-ErrantWaitAndRebuildClassDescRegistry
: During a commandlet World Partition module can initialize itself before AssetRegistry is done. While it tries to search for paths synchronously, it fails due to a bug inside asset registry. It happens mostly for blueprint based actors, and blocks them from being loaded by world partition. When this argument is enabled, we wait for asset registry to finish, and recreate ClassDescRegistry.-ErrantBiomesBuildOnlyVolume=[ActorLabel]
: Allows you to restrict generation to a single world partition builder volume.-ErrantLogLockedFiles
/-ErrantLogLockedFiles=[optional path]
: Enables creation of a log which lists which the files that builder failed to save due to them being locked in the source control by someone else. You can provide path to the log file, otherwise it will be stored in the default projects log directory.