Path Partitioning
Path actors are often long and contain thousands of components. This poses a challenge to the streaming system that needs to load large chunks of data and may cause hitches.
Errant Paths solves this problem by automatically dividing large Paths into smaller Sub-Actors, that take less time to load and thus reduce the chance of causing hitches.
Additionally, splines are spawned separately from other components, and can thus use a different streaming distance or be always loaded. This is often useful as splines may be used by other game systems, such as AI/navigation.
Default partitioning settings are configured in the Project Settings and can be overriden by individual Paths in their PathDescription assets.
Project Settings:
PathDescription settings:
Partition settings:
- SubActor Class - Controls the Actor class used as Sub-Actors and allows changing the streaming settings (in the Actor class).
- Partition Method - Decides how a Path is divided into SubActors - by length, by 2D grid or by 3D grid. Division by length should work well for most Paths. Games that use Paths for complex, twisted structures (ex: piping) might benefit from using 2D or 3D grid divisions, as these settings might reduce the number of created Sub-Actors. The goal is to avoid having Sub-Actors that have very few or very many components.
- Length - How long should each Sub-Actor be when dividing the Path based on length.
- Grid Cell Size - Horizontal dimensions of a grid cell used to divide the Path when 2D or 3D grid partitioning is enabled.
- Grid Cell Height - Vertical dimension of the grid cell used to divide the Path when 3D grid partitioning is enabled.
Examples of different Partition Methods:
- "One Actor" - Example of a Path with one SubActor:
- "by Length" - Example of a Path divided by at 10 meters:
- "by 2D/3D Grid" - Example of a circular Path divided by four grid cells:
Setting Runtime Grid to control how SubActors are loaded
Add a grid in World Settings
infoSet the "Origin" to the half of the "Cell Size" to match the Runtime Grid with the grid we spawn SubActors by. Location of a SubActor should be the corner of the Runtime Grid cell (see video in the fifth step).
Create a SubActor blueprint and assign newly created Runtime Grid
Assign newly created blueprint and match grids cells sizes in a Partition Settings
Update a Path
Compare the Runtime Grids preview with how the SubActors are loaded depending on the camera location