Instanced Meshes vs Merged Meshes

Hi, sorry if I duplicate a topic. I found a few topics on this but none completed enough.
I’m trying to better understand the key differences between using instanced meshes and merged meshes in a Babylon.js scene, especially in terms of performance.

I’ve loaded two scenes into the Babylon.js Sandbox:

  1. One using instanced meshes.
  2. One with the same objects merged.

While I noticed that the total meshes and active meshes differ as expected, all other performance measurements (e.g., draw calls, memory usage) appear very similar. Surprisingly, the scene with instanced meshes shows a much lower absolute FPS (around 300 points less) compared to the merged mesh scene.

This raises a few questions for me:

  1. How exactly do instanced meshes help with performance in real-world scenarios? because as I saw in my small example the absolute fps is lower when using instances tham merged meshes.
  2. What optimizations should I apply to my instanced meshes to ensure I’m leveraging their full potential?

I’d appreciate insights into scenarios where instanced meshes shine or tips on how to configure them for maximum efficiency. Thank you in advance!

related: Mesh Instances vs Merged mesh

I don’t have anything to add myself from the above

Both Instancing and Merging the Meshes will reduce the draw calls similarly, so that perf gain you get w/ both

for Instances, there is less data being transferred to the gpu, so for really large diverse scenes you won’t choke the bus

Maybe you get more fps w/ merged meshes cuz it doesn’t do frustum culling (as brought up in the tagged topic) so your cpu is having an easier time

For different kinds of optimizations you can do w/ instances, you can use Thin Instances, SPS, even remove culling for your normal instances

checkout this deep dive about copies

also check out the more general optimization tricks

4 Likes