In WorldPartition (UE5.1.0), actors are split into a grid based on their bounding box. Actors that are in the same grid are then merged into one HLOD actor. This results in many HLOD actors such as HLOD0/MainGrid_L0_X0_Y0_DL0, HLOD0/MainGrid_L1_X0_Y0_DL0, and HLOD0/MainGrid_L2_X0_Y0_DL0. Actors that are on the cell border are not placed in the L0 cell or the HLOD_L0 actors. There are many actors in the top level, such as L3 or L4, and the mesh that is merged becomes messy, with many faces missing.
However, in CitySample, building actors that have bounding boxes that cover cell borders are merged into one HLOD_L0 actor and merged into L0 actors only. Building actors don’t show up in higher levels like L1 or L2. The L0 cell is small, so only a few actors are merged into one mesh, resulting in a good look.
The question is: How did CitySample generate HLOD actors, and is it related to the deprecated EActorGridPlacement? It’s possible that the building actors were set to EActorGridPlacement location instead of bounds.
Original Actors:
HLOD Actor:
1 Like
[ConsoleVariables]
; World Partition
wp.Runtime.RuntimeSpatialHashUseAlignedGridLevels=0
wp.Runtime.RuntimeSpatialHashSnapNonAlignedGridLevelsToLowerLevels=0
wp.Runtime.RuntimeSpatialHashPlaceSmallActorsUsingLocation=1
wp.Runtime.RuntimeSpatialHashPlacePartitionActorsUsingLocation=0
bool GRuntimeSpatialHashUseAlignedGridLevels = true;
static FAutoConsoleVariableRef CVarRuntimeSpatialHashUseAlignedGridLevels(
TEXT("wp.Runtime.RuntimeSpatialHashUseAlignedGridLevels"),
GRuntimeSpatialHashUseAlignedGridLevels,
TEXT("Set RuntimeSpatialHashUseAlignedGridLevels to false to help break the pattern caused by world partition promotion of actors to upper grid levels that are always aligned on child levels."));
bool GRuntimeSpatialHashSnapNonAlignedGridLevelsToLowerLevels = true;
static FAutoConsoleVariableRef CVarRuntimeSpatialHashSnapNonAlignedGridLevelsToLowerLevels(
TEXT("wp.Runtime.RuntimeSpatialHashSnapNonAlignedGridLevelsToLowerLevels"),
GRuntimeSpatialHashSnapNonAlignedGridLevelsToLowerLevels,
TEXT("Set RuntimeSpatialHashSnapNonAlignedGridLevelsToLowerLevels to false to avoid snapping higher levels cells to child cells. Only used when GRuntimeSpatialHashUseAlignedGridLevels is false."));
bool GRuntimeSpatialHashPlaceSmallActorsUsingLocation = false;
static FAutoConsoleVariableRef CVarRuntimeSpatialHashPlaceSmallActorsUsingLocation(
TEXT("wp.Runtime.RuntimeSpatialHashPlaceSmallActorsUsingLocation"),
GRuntimeSpatialHashPlaceSmallActorsUsingLocation,
TEXT("Set RuntimeSpatialHashPlaceSmallActorsUsingLocation to true to place actors smaller than a cell size into their corresponding cell using their location instead of their bounding box."));
bool GRuntimeSpatialHashPlacePartitionActorsUsingLocation = true;
static FAutoConsoleVariableRef CVarRuntimeSpatialHashPlacePartitionActorsUsingLocation(
TEXT("wp.Runtime.RuntimeSpatialHashPlacePartitionActorsUsingLocation"),
GRuntimeSpatialHashPlacePartitionActorsUsingLocation,
TEXT("Set RuntimeSpatialHashPlacePartitionActorsUsingLocation to true to place partitioned actors into their corresponding cell using their location instead of their bounding box."));
2 Likes
So, actors that cross cell boundaries don’t get correct HLODs in UE 5.1 / world partition?
I’m also experiencing this behaviour. Do you have any workarounds?
look at my second post.
Put those config to DefaultEngine.ini