Skip to main content

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:

image

PathDescription settings:

image

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: image
  • "by Length" - Example of a Path divided by at 10 meters: image
  • "by 2D/3D Grid" - Example of a circular Path divided by four grid cells: image

Setting Runtime Grid to control how SubActors are loaded

  1. Add a grid in World Settings

    info

    Set 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).

  2. Create a SubActor blueprint and assign newly created Runtime Grid

  3. Assign newly created blueprint and match grids cells sizes in a Partition Settings

  4. Update a Path

  5. Compare the Runtime Grids preview with how the SubActors are loaded depending on the camera location