Closed ebeaufay closed 1 year ago
Hi @ebeaufay, it's a restriction of the extension: https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_draco_mesh_compression/README.md#restrictions-on-geometry-type
When using this extension, the
mode
ofprimitive
must be eitherTRIANGLES
orTRIANGLE_STRIP
and the mesh data will be decoded accordingly.
I see thanks for checking this out, I should have checked myself.
Both cesium and threejs load draco compressed points fine even if it's non standard. It seems it would just be a matter of extending the spec.
I wrote up an issue for extending the spec a while back: https://github.com/KhronosGroup/glTF/issues/1809
It hasn't gained much traction but good to see that there's some interest.
Hi,
I tried to draco compress a point cloud in a glb file but the output files where the same size.
Looking into the library I see that primitive mode must be WebGLConstants.TRIANGLES but by forcing the code to accept WebGLConstants.POINTS, I managed to draco compress the file and it is readable, at least in three.js.
Would you consider allowing points to be processed by default or are there some other considerations I'm not aware of?
The line I changed to make draco compression work for points is : lib/compressDracoMeshes:146