I have a scene that contains around 20,000 planes, all using the same material.
From a performance point of view, my instinct tells me that as they all share the same material, merging these meshes into single mesh would be more performant (as it reduces draw calls). However, I’m assuming that the whole of the mesh would still be passed to the GPU for rendering, regardless of whether polygons were visible to the camera or not.
OR - would it be better to keep the planes as separate objects so the culling mechanism doesn’t pass the to the GPU if they’re not visible?
Hello,
You might use instances instead : Use Instances - Babylon.js Documentation
One draw call and a culling mechanism (I guess), but still one world matrix computation per instance if you don’t freeze it.
And you’re right : merging all the meshes or using a solid particle system passes all the vertices, including invisible ones, to the GPU.
So just make the test in your own case (moving planes or not ?) to check what’s the best option. I think instances should be the best for you.
@Deltakosh will be back from Berlin soon and he’ll come with a brand new feature to manage dozens thousands instances at 60 fps (+ a faster PG)
stay tuned