Missing faces/vertices in custom mesh (using VertexData)

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

It looks like some of your faces are not in the correct order: Face Culling - OpenGL Wiki

Disabling back face culling tends to prove this out.

2 Likes

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

1 Like