When loading geometry data manually, what causes a mesh to never appear?

I’m running into an issue where meshes sometimes never appear based on the geometry data. The meshes are created from voxels via an isosurface extraction algorithm. I’m guessing the answer to this question is: the geometry data is invalid – but I’d like to understand why it is invalid and, if possible, how to get a better error message.

The strange thing is: the meshes that don’t appear sometimes appear when material.wireframe = true. This makes me think its some kind of culling or shader issue? When the wireframe does appear, it is the correct color.

There are no WebGL errors being reported, I don’t see any exceptions in the console and I tried using Spector.js but I don’t actually know how to read it well enough to notice any issues.

Here’s a playground reproducing the issue: Babylon.js Playground. At the bottom of the playground, there are gigantic positions, normal, and indices arrays .I have it ignore those normals and run VertexData.ComputeNormals just in-case the normals were causing the issue (but they weren’t).

How can I get a better error message to tell me what specifically is wrong with the geometry data?

I’ve also tried exporting as a GLB but I think it expects uv to be defined and the GLB file is a bunch of NaN values (even though the arrays do not contain NaN).

The wireframe mode shows only lines: are all your triangles degenerate triangles?