# Missing faces/vertices in custom mesh (using VertexData)

**URL:** <https://forum.babylonjs.com/t/missing-faces-vertices-in-custom-mesh-using-vertexdata/30745>\
**Category:** Questions\
**Created:** [May 25, 2022, 9:51pm UTC](https://forum.babylonjs.com/t/missing-faces-vertices-in-custom-mesh-using-vertexdata/30745 "2022-05-25T21:51:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![TameAim](https://avatars.discourse-cdn.com/v4/letter/t/43a26b/32.png) [@TameAim](https://forum.babylonjs.com/u/TameAim)\
**Post date:** [May 25, 2022, 9:51pm UTC](https://forum.babylonjs.com/t/missing-faces-vertices-in-custom-mesh-using-vertexdata/30745/1 "2022-05-25T21:51:09Z")

</div>

I am trying to mathematically generate a custom mesh from a bunch of vertices, however many of the vertices aren’t appearing. Can anyone suggest why this might be?  
Please see the Playground example below:  
[https://playground.babylonjs.com/#JNGCQ9](https://playground.babylonjs.com/#JNGCQ9)

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [May 25, 2022, 11:51pm UTC](https://forum.babylonjs.com/t/missing-faces-vertices-in-custom-mesh-using-vertexdata/30745/2 "2022-05-25T23:51:54Z")

</div>

It looks like some of your faces are not in the correct order: [Face Culling - OpenGL Wiki](https://www.khronos.org/opengl/wiki/Face_Culling)

> **[Babylon.js Playground](https://playground.babylonjs.com/#JNGCQ9%232)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL 3D scenes

Disabling back face culling tends to prove this out.

---

<div class="post-metadata">

**Author:** ![TameAim](https://avatars.discourse-cdn.com/v4/letter/t/43a26b/32.png) [@TameAim](https://forum.babylonjs.com/u/TameAim)\
**Post date:** [May 26, 2022, 4:54pm UTC](https://forum.babylonjs.com/t/missing-faces-vertices-in-custom-mesh-using-vertexdata/30745/4 "2022-05-26T16:54:30Z")

</div>

Thanks @sebavan, this worked perfectly. I had actually made another error too, where I had only been adding to the indices array after every facet (12 numbers added to position array), rather than every 3 numbers added to the position array.  
So for any lost soles who stumble across this post, the below is the fixed Playground example.  
[https://playground.babylonjs.com/#JNGCQ9#4](https://playground.babylonjs.com/#JNGCQ9#4)
