After facebook announced glTF support on their timeline I’ve been trying to use the
GLTFExporter to generate some binary glTF (
glb) to test this new feature.
But I’ve found some problems so far:
- GLB Chunks must be 4-byte aligned #13395
- Validation: Fix znear and zfar: #13396
- Vertex Color: Facebook supports just RGBA but not RGB. As shown on the validation message:
[msg] => Vertex COLOR_0 attributes of type RGB are (temporarily) notsupported. They must be RGBA.. Although
vec4and we could include an optional parameter to force the conversion of the
colorattribute from 3 to 4 components, I don’t think we should do that hack as our current implementation is following the spec and I don’t see any other use case for that conversion than just hijack the facebook validator while they’re working on fixing it. <– Update: This should be done in the following weeks, so we don’t need to workaround it
- Non indexed meshes are not supported: `[msg] => Mesh primitives without indices are (temporary) unsupported.
- Export other primitive modes (Currently just TRIANGLE supported)