Optimize rotation of an actor with thousands of actors attached on it

Hello,

we have a 3d game which is played on a vertical 2d grid, composed of blocks. Each block is an actor, composed of 6 static mesh components (one per face), and we can have up to 2500 blocks in the grid (50x50)

The problem I face is a huge DPS drop (from 100Fps to 20) when I rotate the root actor. I managed to have a much better FPS (around 50 FPS) by disabking the collision on every component during the rotation, by disabling completely the navigation system (since we don’t need it), and by using a scoped update.

Nonetheless, we still have a lot of time spent in UpdateComponentToWorld, like you can see in this profiling session

Would some flags on components, or functions, or whatever, be worth of interest to speed up the process?

I was thinking of using an InstanceMeshComponent, I did a few tests and it helps a lot, but that would require some huge refactorings in the code to implement that.

Thanks !

Just an idea>

use single block as the main object that you are moving
and use other static objects to make partitions in the main block.

I’m facing the same issue right now. Thought attached components do not update, as it would.be enough to have the relative transform and calc the world transform on request. But I gues the world Transform is required for rendering and thus musst be calculated anyway each frame?

Use WPO offset through eg. MPC, it’s ultra cheap…

Also, 1000s of instanced meshes can be even SLOWER to transform, since to move instances unreal has to destroy them and spawn them in different locations, and then also update the hierarchy tree if it is HISM

yes indeed. used to calc the bounds of the component, for frustum culling

Use WPO offset through eg. MPC, it’s ultra cheap…

Sorry, I did not understand :confused:

Also, 1000s of instanced meshes can be even SLOWER to transform, since to move instances unreal has to destroy them and spawn them in different locations, and then also update the hierarchy tree if it is HISM

Not sure about that though

Sorry, I do not understand. I thought the issue to be the update ob the ComponentToWorldTransform. What do you mean by that? What do the bounds help to increase the Translation performance of an actor with tons attached to it?

This was an answer to the question of your previous reply :slight_smile:

But I gues the world Transform is required for rendering and thus musst be calculated anyway each frame?

English please?

WPO = WorldPositionOffset (Material Vertex Shader output)

MPC = MaterialParameterCollection (Asset for global material data input)

HISM = HierarchicalInstancedStaticMesh

His methode only moves the visual representation, not the object and the collision