# Create 1 submesh for disjoint indices

**URL:** <https://forum.babylonjs.com/t/create-1-submesh-for-disjoint-indices/50737>\
**Category:** Questions\
**Created:** [May 21, 2024, 8:01pm UTC](https://forum.babylonjs.com/t/create-1-submesh-for-disjoint-indices/50737 "2024-05-21T20:01:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![DukeVen](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/dukeven/32/34217_2.png) [@DukeVen](https://forum.babylonjs.com/u/DukeVen)\
**Post date:** [May 21, 2024, 8:01pm UTC](https://forum.babylonjs.com/t/create-1-submesh-for-disjoint-indices/50737/1 "2024-05-21T20:01:07Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Deltakosh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/deltakosh/32/26635_2.png) [@Deltakosh](https://forum.babylonjs.com/u/Deltakosh)\
**Post date:** [May 21, 2024, 8:30pm UTC](https://forum.babylonjs.com/t/create-1-submesh-for-disjoint-indices/50737/2 "2024-05-21T20:30:08Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![DukeVen](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/dukeven/32/34217_2.png) [@DukeVen](https://forum.babylonjs.com/u/DukeVen)\
**Post date:** [May 21, 2024, 8:43pm UTC](https://forum.babylonjs.com/t/create-1-submesh-for-disjoint-indices/50737/3 "2024-05-21T20:43:14Z")

</div>

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