how to optimize many actors in scene

Hello~

I am making a landscape using Marching Cube, But I faced a sharp drop in performance.

At first, I was delaying vertex optimization, so I thought this was a problem.
but after the optimization I had the same problems.

Even if I eliminated the all vertex, the same thing happened!

There is one parent actor, and there are 41 x 41 x 41 descendants below it.
Unused actors have only been created for quick adaptation when the terrain changes.

The picture is a state without vertices(models), but all the actors are on the screen

Again, if the actor is not on the screen, the frame will return normally.

I used ‘bUseAttachParentBound’ to set the bounds of unused actors, or tried other settings, but they all failed.

Is there any way to optimize only by deleting(Reducing actors exposed to the screen) unused actors?

Use Level Streaming Buddy

Divide your level into smaller levels(parts) and only load the level(show the player) the parts that are relevant to him and unload the rest parts

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.
1 Like

The thing is. What if there are NPCs walking around that areas that are not streamed and everything? How can we deal with those?

Literally the worst take in history lmao