# How to use two or three separate triangle mesh

**URL:** <https://forum.babylonjs.com/t/how-to-use-two-or-three-separate-triangle-mesh/14312>\
**Category:** Questions\
**Tags:** material\
**Created:** [September 21, 2020, 10:56am UTC](https://forum.babylonjs.com/t/how-to-use-two-or-three-separate-triangle-mesh/14312 "2020-09-21T10:56:05Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Arash\_Bagheri](https://avatars.discourse-cdn.com/v4/letter/a/dfb087/32.png) [@Arash\_Bagheri](https://forum.babylonjs.com/u/Arash_Bagheri)\
**Post date:** [September 21, 2020, 10:56am UTC](https://forum.babylonjs.com/t/how-to-use-two-or-three-separate-triangle-mesh/14312/1 "2020-09-21T10:56:06Z")

</div>

hello everyone

I want to build an triangle custom mesh with the help of a geojson file, I need to build each section as a separate custom mesh, because each section has a specific color, I want to know how can I build separate custom mesh separately with their specific colors.

this is my PG: [https://www.babylonjs-playground.com/#VKBJN#920](https://www.babylonjs-playground.com/#VKBJN#920)

---

<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:** [September 21, 2020, 3:52pm UTC](https://forum.babylonjs.com/t/how-to-use-two-or-three-separate-triangle-mesh/14312/2 "2020-09-21T15:52:45Z")

</div>

You can simply add the color to the vertexData with `vertexData.colors`

---

<div class="post-metadata">

**Author:** ![Arash\_Bagheri](https://avatars.discourse-cdn.com/v4/letter/a/dfb087/32.png) [@Arash\_Bagheri](https://forum.babylonjs.com/u/Arash_Bagheri)\
**Post date:** [September 21, 2020, 4:09pm UTC](https://forum.babylonjs.com/t/how-to-use-two-or-three-separate-triangle-mesh/14312/3 "2020-09-21T16:09:24Z")

</div>

Thank You so much. the problem is how can I split the arrGeo to make three vertex data, I know it is the JavaScript Problem, But is it possible to help me to know How can I do it?

I mean, I want to make arrGeo = [[pos1], [pos2], [pos3] ] then make three vertexData with pos1,pos2 and pos3

---

<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:** [September 21, 2020, 4:27pm UTC](https://forum.babylonjs.com/t/how-to-use-two-or-three-separate-triangle-mesh/14312/4 "2020-09-21T16:27:55Z")

</div>

I think it should be easier to ask on stackoverflow for javascript questions 🙂

---

<div class="post-metadata">

**Author:** ![Arash\_Bagheri](https://avatars.discourse-cdn.com/v4/letter/a/dfb087/32.png) [@Arash\_Bagheri](https://forum.babylonjs.com/u/Arash_Bagheri)\
**Post date:** [September 21, 2020, 7:14pm UTC](https://forum.babylonjs.com/t/how-to-use-two-or-three-separate-triangle-mesh/14312/5 "2020-09-21T19:14:31Z")

</div>

Thanks a lot
