HISM performance very strange

I’ve been trying to use HISM, but I’ve noticed that the performance is strange. Adding a large amount of instances is fine. Once they are loaded, the performance is great. There is lag on the game thread when adding initially, but I understand that adding a large amount of collision enabled things would lag the game thread.

What I do not understand, is once I have added about 20,000 HISM planes to the scene, removing or adding just a single instance lags the game thread significantly. But how can this make sense?

Doesn’t UE use HISM for foliage? With the foliage tool I can have a million instances in the scene, and removing a couple or adding a few more doesn’t cause noticeable lag.

So why is there a massive performance cost when adding just one or two instances, or removing a couple instances, to a HISM component, once that component has 20k+ instances? And why does this same lag not occur with foliage, where the instance counts can be much much higher?

What is going on here?

Unreal 5.1

Thanks

I’m not entirely sure ( I don’t know how you’re making these instances ), but if you’re doing it in construction, then the whole script has to run every time you make a change.

IE, re-make all 20k instances, just to remove one.

I just made 20K cubes ( HISMs ), and I can remove one without any hit ( if I don’t remake them all ).

1 Like