World partition instanced static meshes are loading incorrectly

I’m using world partition and creating instanced static mesh actors. Each actor is located in the center of a cell. When I simulate the loading is all over the place.

I initially added the instances with houdini plugin but as it didn’t work I recreated the instance spawning with an editor utility blueprint. Same issue loading is not right.

If I scatter foliage its working as expected. There is no documentation about how the spatial streaming works. I checked the code of the Rule Processor plugin but its too complex for me. Any ideas?

Tested in 5.1 and 5.2


Hi useeresu,

How have you created the instances in your utility blueprint? Are they all created from one ISMC or HIMSC or is each square on your level a blueprint/actor?

The actors have a flag “IsSpatiallyLoaded” - if you have blueprints controlling the ISMs/HIMs make sure that is not ticked…

image

1 Like

Hi @RecourseDesign

Thanks for your reply! I spawn an actor to the scene in a grid layout and each actor in a tile has an instance static mesh component with the same instances as the other actors. If I uncheck spatially loaded for the instance holder actor its just loaded all the time. What am I doing wrong?

All ISM component instancing the same static mesh


If I check the World Partition window the Instance holder actors show up with the instances bound so I would assume if the spatially loaded is ticked they would stream in and out as I get close by.

Maybe have them always load, but set up the Cull Distance for them so they only render when close to the camera?

Well that can be a solution but I would hate to cut corners if there is a system specifically for this. In the matrix city demo it works like this and I hate not understanding something. Keeps me up at night :smiley:

There is nothing about this in the documentation and I cant be the only one having this issue. I would love to understand how it really works

1 Like

Yeah I really want to know now too! If you find how please post it here…

Regarding the matrix demo - their instances may be managed by the level instancing?

Yeah I will once I finally do :slight_smile: .

No actually they made a plugin for reading alembic point clouds generated by houdini. Its called rule processor and it’s parsing the data and spawning actors with ism components which is of course working for their project.

1 Like

If the bounds of the ISM actors are bigger than a single cell they might be getting promoted to a higher level streaming cell, which is bigger and covers multiple tiles. You should check the debug streaming grid overlay to see better what is happening.

To turn on debug streaming grid: wp.Runtime.ToggleDrawRuntimeHash2D

  • It shows level 0 by default, you can change the grid level with wp.Runtime.ShowRuntimeSpatialHashGridLevel <level_number>
  • You can also show multiple grid levels at once with wp.Runtime.ShowRuntimeSpatialHashGridLevelCount <level_count>

Hope this helps you see what’s happening.

2 Likes

Also the debug views were really helpful but in this case what I found that if an ISM actor is overlapping two cells it can get promoted to the persistent level. Using this settings can solve that:

wp.Runtime.RuntimeSpatialHashPlaceSmallActorsUsingLocation=1

This is from the matrix demo config the full one is like this:
[SystemSettings]
; World Partition
wp.Runtime.RuntimeSpatialHashUseAlignedGridLevels=0
wp.Runtime.RuntimeSpatialHashSnapNonAlignedGridLevelsToLowerLevels=0
wp.Runtime.RuntimeSpatialHashPlaceSmallActorsUsingLocation=1
wp.Runtime.RuntimeSpatialHashPlacePartitionActorsUsingLocation=0

Also I was only able to see the debug view if I play in selected viewport and not in simulate.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.