Combining multiple assets using Blueprints vs a single static mesh

Hi, I have recently joined a project where the team uses blueprints to combine many small assets together, typically for buildings, in some cases comprising of several hundred static meshes. They say they were told to do this by people at Epic for culling reasons. They have terrible fps in most cases, but the vertex count is far higher than needed.

I did a test by duplicating one of the blueprint buildings containing 60 static meshes 168 times and was getting 45fps.

I compared this to the same assets attached together as a single static mesh, but with now 16 materials, duplicated 168 times and my frame rate increased to 90fps.

This confirmed what I have experienced at previous studios where each mesh is a draw call and so even with culling the count can be very high if the pieces are not occluded properly. Are you able to confirm that these static meshes are not instanced by default, and provide some rough guidelines to using blueprints to combine static meshes in this way? Are there any sensible numbers we should be aiming for?

Many thanks,
Rich

Richard,

I believe your instinct is correct about merging meshes. However, I will do some more investigation to confirm it.

The tricky part about performance issues is that they’re generally unique. Someone may have suggested using multiple meshes without realizing the large number that you would be working with. However, as the number starts growing (as you’ve seen) it can become impractical.

Thanks,
Jon N.

Richard,

This page has some pretty good profiling information CPU Profiling.
From what I’ve found, yes each mesh basically acts as it’s own draw call, as well as it’s own physics body (unless physics is disabled, of course).

There are a few things you can do:

  1. As you’ve already done, combine multiple meshes into a single mesh.
  2. If your reusing the same mesh over and over, consider using an InstancedStaticMesh or HierarchicalInstancedStaticMesh.
  3. Ensure that collisions, overlaps, and physics are disabled for any meshes that are not absolutely necessary.
  4. On meshes where collisions or overlaps are required, try using simple collisions instead of complex (tri-mesh) collisions.

Thanks,
Jon N.