Create 1 submesh for disjoint indices

Is it possible to create a submesh for 2 faces that are not directly joined/connected with each other?
Take a box for example, I want the top face and the bottom face to be 1 submesh, and the other faces on the side to also be 1 submesh, so that the whole mesh consists of 2 submeshes.
Since the BABYLON.Submesh class only lets me define the indexStart and the indexCount, I am not sure how I’d be able to create a Submesh for a face (2 tris) which has the indices 0,1,2 and 9,10,11 for example.

Tagging @Evgeni_Popov

Yes you can, a submesh is just a list of faces but nothing forces you to have those faces linked in anyway if you decide to use triangle list.

But I feel like your question is: is it possible to have submeshes with disjoint indices and this is not possible. Submeshes are defined by a start index and a lengh. So all face indices must following each others

2 Likes

Yeah, your wording is basically what I was asking. I have edited the title.
Thanks for the clarification!

1 Like