Why are my actors always loaded when crossing world partition grid cell boundaries?

I want to use world partitioning for my project, but it is not working the way I expected.

If I put actors in my scene and that cross the boundaries between two grid cells, they are always loaded when in game mode, even when both grid cells are outside the loading range.

Scene:

Play:

To demonstrate what I mean, I created in Unreal 5.1.1 a new level from the “Open World” template, reduced the “Cell Size” and “Loading Range” in the “World Setting” as displayed. Then I placed two “Cube” “StaticMeshActors” into the scene outside of the loaded grid cells. The left cube is inside of a cell, the right cube crosses the boundaries between two neighboring cells. When I start playing, the right cube is always loaded right away although neither of the grid cells it is in are loaded. When I move forward the left box loads as expected.

How do I get UE to load the right cube only when I get close?

From what you describe it sounds more likely that your visible cube is set in a persistent level.
However. The old system (and i presume the new one too) always needs an initial tile to load, so it could be that as well.
Make sure you have an extra tile and that the player position is on that tile initially.

The old system supports distance settings in the levels tab. Assuming you set layers to a 0 distance, then you should get something very similar to what you are asking.
Can’t say i have ever used anything less than 250m as a distance value for tile loading though, so not sure you’ll get what you expect.

Not familiar enough with the “new” system to guess, but i can only tell you that here in the forums people constantly complain about it being worthless…

MostHost_LA, thank you for your response.

Can you please confirm that you mean with “old” system the Level Streaming that already existed in UE4, “new” system the world partitioning that is now available in UE5, and “tile” a world partition grid cell.

I tried as you suggested:

All without success.

Both cube static mesh actors have “Is Spatially Loaded” turned on, which according to the documentation, should be sufficient to remove it from being displayed persistently: World Partition in Unreal Engine | Unreal Engine 5.1 Documentation

However, the documentation also states in section World Partition in Unreal Engine | Unreal Engine 5.1 Documentation that “When the Level opens, the Editor will only load Actors that have their ‘Is Spatially Loaded’ setting marked as False”.
My actors get displayed after opening the level although the flag is set to true.
Does anyone have a clue why?

here in the forums people constantly complain about it being worthless…

That would be very disappointing.

Correct. World Composition.

Correct.

OR, World Composition Level tile (they are actually different levels when created using the landscape).

I know for a fact WorldComposition works similar to what you expect.

No clue on WorldPartition which is what you are trying to use.

One thing which can help you correctly load stuff is probably DataLayers.
Seems to be the only thing you haven’t mentioned yet, so maybe give it a look.

One thing which can help you correctly load stuff is probably DataLayers.

No luck there.

It just seems like WorldPartion can’t decide to which grid cell it should assign these actors and instead assign it to the persistent level.

I guess I’ll try WorldComposition.

Ohh man! Had the same issue for weeks and I found it finally I think:

wp.Runtime.RuntimeSpatialHashPlaceSmallActorsUsingLocation=1

This is from the Matrix demo config. The full one is like this:
(paste it in the DefaultEngine.ini)

[SystemSettings]
; World Partition
wp.Runtime.RuntimeSpatialHashUseAlignedGridLevels=0
wp.Runtime.RuntimeSpatialHashSnapNonAlignedGridLevelsToLowerLevels=0
wp.Runtime.RuntimeSpatialHashPlaceSmallActorsUsingLocation=1
wp.Runtime.RuntimeSpatialHashPlacePartitionActorsUsingLocation=0

2 Likes

Thanks, that’s helps… mostly. There is some official description of the problem, which boils down to solution you found. Considering i’m using this in 5.4.1, it’s still isn’t fixed

Also, not sure if in 5.4.1 it works as config\cvars, but they have their analogues in WorldSettings, which may override the cvars

изображение

//offtop:

mostly

In some cases the characters are still loaded despite being outside of streaming range, and what is much worse - they are loaded before the static meshes characters are placed on; And those static meshes are on another grid with x2 more loading range than the characters grid.

@IrSoil where you able to find a solution for the problem where some actors are always loaded though they are far away from my character/streaming source, they are being assigned to higher level cells. I have set wp.Runtime.RuntimeSpatialHashPlaceSmallActorsUsingLocation=1 but I am still facing the same problem.

Unfortunately i didn’t.

I’m ended up with stuffing in a bunch of workarounds:

  • some combination of those cvars;
  • tweaking loading ranges on both grids for the problem to be less noticable;
  • iirc with 5.4 there is a second hashing method can be selected in world settings(?) in a drop-down menu. And it performed slightly better;
  • placing invisible bIsSpaciallyLoaded=false cubes under bugged actors that have gravity enabled, so they won’t die immediately;
  • swearing to not use world partition again anytime soon until they’ll fix it in a next few major versions. (5.4’s WP is still better than 5.3 & 5.1 ones, but it’s still bad)
1 Like

Thank you for the info.