In UnrealEngine5 why did I Merge actors into MeshInstance using Batch mode with the same Mesh and the performance decreased. As a side note, my work is to merge a group of vegetation staticmesh, their mesh source and material are the same. When I use a separate group of mesh actors, the engine can achieve 60fps, but when I merge them, the frame rate drops by half, and becomes 30fps instead. It’s weird
How many?
Mesh instancing only really kicks in when you get into high hundreds, I think.
These instances exist in the scene, the number of a exists 65 instances, the number of b exists 131 instances, and the number of c exists 33… d:69… e:23… f:5… g:12… h:9… i:441… j:148. I wouldn’t be surprised if the performance didn’t improve. but the frame rate dropped by 30fps And when I use the “stat unit” command to check, it is found that draw call blocks heavily after using the instance actor mode. By the way, I add that other models of my scene have nanite enabled, but this instance is static mesh, but I don’t think this is the cause of the situation
Right, low numbers.
I think you’ll find if you put 3000 copies of mesh A in the scene, you’ll get a low fps. But if you put 3000 instances of A, you get better fps. But, still lower than not having A at all…
Thank you for your help😀 I can understand that there is no performance improvement due to insufficient quantity, but I can’t understand why there is such a big drop in performance
It is quite a big drop, but a lot depends on the meshes. I don’t really know your situation, maybe these meshes have millions of polys for example?
These staticmesh from within the “Epic” mall “CityParkEnvironmentCollec” project, I see their designer is this kind of treatment of the vegetation. Currently, in my cognition, I feel that the instance actors have some characteristics that I don’t know about, so I don’t deal with them well
You mean this?
All the actors are already instanced, so reinstancing them might have a strange effect
Yes, they come from this project. But instead of instantiating them again with their Actor, I migrated the StaticMesh asset of their Actor to my project, and by manually placing the staticmeshActor, Then go to Tools->Merge Actor → Batch to generate the new MeshInstanceActor
That sounds ok.
Yes, I understand some of the basics of engine, so I decided to give up using instance Actor for now. I will try to investigate the reason for this confusion later, although I also tried to google the answer. Finally, thanks for your help
If you restrict the test to one tree mesh ( for example ), in an empty level, I can tell you what figures I get… Otherwise, yes, it is just trial and error.