41x41x41 = 68921 actors. Generally speaking you want to be looking at < 5000 actors depending on your project (in some you can get many more, but 68000 is way too many).
The reason it’s slow as you’re performing visibility checks against each one as well as then having the cost of draw calls etc.
As always with optimisation, there’s not just one answer and it’s heavily dependent on your project. A few things you can try:
- Don’t have everything as a child actor of a root. Child actors are generally slow and clumsy so avoid wherever possible. Instead has each child as a new actor.
- Look at using culling volume / culling distances
- Look at using level streaming or world composition
- Look at using instances or heirarchial instances if your actors share the same mesh and materials (and you’re using 1 material per mesh that’s going to be instanced)
- Add lods to reduce the poly count of what is shown
- Look at using HLODs to create proxymeshs to simplify whats being rendered as well as reducing the number of actors which need to be drawn
- Simplify materials / transparency / overdraw etc.