Spawning many actors lowers fps

Hi.

If i spawn like 70 actors, which are moving along on the map, the fps falls to like 20 or lower.

I did read links like Mobile Performance etc, but still dont know how to fix this.

I am talking about PC but of course mobile is touched too with this problem

I am spawning just simple static meshes with like 70 vertices, i tried to remove materials on it, but the problem is still there. It seems to me, that it is issue of physical engine. (If all 70 actors are moving fps drops).

Any tips, how to fix this?

Thanks,

L.

No one tell you what is exactly a problem, but you can profile low fps cause;)

Watch and read:

https://docs.unrealengine.com/latest/INT/Engine/Rendering/PerformanceProfiling/index.html

thank you, i will check it

Some more info:

I used command Stat detailed, and e.g. on iPad with 50 actors, Draw is like 10 ms (thats good i guess) but Frame and Game is 50ms, which is too high yet (its equal to 20 FPS. 1000 / 50)

So it is bit surprising that GPU is probably good, but somethinig others is very ******…

L.

How do you move them?

Hello . I move every actor using their own tick event and this function:

link text

However i think i tried today to use Simple Move To (on root component of actor) instead of this moving function and i guess it has same results.

Thanks,

L.

But to make it more difficult. I think if i even just spawn like 60 these actors on PC, they will also make slow the FPS to 20 on PC… So just spawning, all one one location (they make pillar where is one object stacked on other object, which then gets destroyed and all objects falls)

Btw now i see that the author * of moving method i am using says, that finally it should be used in timer. So i could try put it in timer, but not to be fired every frame… but as i said, i think the problems are with physics enginge itself (that like 40-70 actors are moving at same time).

*: Or not author, because its not 's code, but at least said that (i am using MoveCube code which is posted there under post

Ok reason why you might get slow downs is because BP virtual machine is slow and because engine waits from all Tick operation to be done until pushing the frame it increase rendering time, so it’s not very good with doing large operations on tick via BP.

You could try using using any movement component which has move code in native as well as try to do some simple Tick code in C++ (native class which you can later use it as a base for BP code)

Also if you ever use tick for any add/substract location movement you need to scale the values hat you add to location or rotation with delta time, like this:

(delta*DeltaSecounds) + Location

Because Tick is executed on every frame and frame times dont need to be consist and might change speed of objects depending on fps

ok thank you for your answer, i am appreciating it.

anyway, i must inspect it more, because i think that really only spawning + physical enginge + no moving will slow it… so basicly just spawning with simulate physics on…

(i will try just take some desk, put walls around and spawn like 50-60 actors - simple static meshes with phys on, and will watch the FPS)

but i must check it, if is it really related with BP as u say, or not.

anyway, every information is good.

Thanks

I did the test… i spawned bulk of some static meshes and FPS doesnt dropped. If i spawn bulk of “my” BP static mesh FPS drops. I think the reason could be that my BP static mesh is Pawn.

I created it when i was learning UE. I know it can be just actor. May be that could be the reason? I will try it.

Or basicly the spawned BP is child of another BP, so may be it is heavy load for memory in that case. Anyway i will inspect it.

edit: i tried reparenting to actor from pawn, but still quite slower… so the reason is probably it is child of another BP, or generally that BP is slow, as you said… i will inspect more tomorrow.

Thanks again, both of you.

Yeah I found that too,spawning hundreds of Meshes doesn’t drop FPS but if you spawn over 50 actor at the same time FPS drops heavily,even the most simple actor with little blueprint.So did you solve that problem?