Loaded model rendering differs from blender

Version: 9.2.1
Engine: WebGL2
Playground: Babylon.js Playground
Model: man_woman_walk.zip (540.8 KB) (sourced from sketchfab in its metadata)

Expected:
It renders the modeling artifact similar to blender/sketchfab


Actual:


cc @bghgary

This is a model issue. Running the glTF-Validator on your GLB shows 508 errors and 21,932 warnings, including this one:

ACCESSOR_WEIGHTS_NON_NORMALIZED — Weights accessor elements (at indices 14524..14527) have non-normalized sum: 4.68e-38

The woman’s hair mesh (Object_6) has a vertex (index 3631) whose bone weights are essentially zero: [4.67e-38, 0, 6.11e-41, 0]. Two triangles reference this vertex. Because the weights sum to ~0, the skinning matrix becomes a near-zero matrix, which collapses the vertex to the origin. Those two triangles then stretch from the hair to the origin, creating the visible black lines.

Some other engines (e.g. three.js) normalize all skin weights on load, which masks this kind of defect. We could do something similar in Babylon.js, but we’re leaning towards not adding this because it would increase the loading cost for every skinned mesh — iterating over all vertices to check/fix weights — even though the vast majority of models have correct data. The glTF spec states that weights should sum to 1.0, and we’d prefer not to pay that cost to work around malformed assets.