Render same mesh several times

Hello. I am developing an application for visualizing BIM models.

The model is a single mesh, I control colors and visibility using vertex buffers (position buffer does not change, visibility is controlled by a separate buffer).

I have a desire to render a mesh several times but with different vertex buffers (colors and visibility) as shown in the picture.

I would like to ask about the best way to implement this.
I read about View, Viewports, Multiview and to be honest, I got a little confused.

Basic requirements:

  1. Ability to change vertex buffers separately.
  2. Ability to use multiple canvases (with different sizes).
  3. Perfomance and efficient use of memory (using one mesh).

To me, if vertex buffers are different, then it should be a different mesh.
But grouped by vertex buffer, is something like thin instances would be usefull? Thin Instances | Babylon.js Documentation

Also, how many time do you want to render these meshes? If it’s a couple times, I’m not sure it’s worth trying to get more performant.
If it’s hundred or thousand of times, then thin instances might be usefull.

And here is a bunch of ways to improve rendering performance : Optimizing Your Scene | Babylon.js Documentation

2 Likes