KhronosGroup / glTF

glTF – Runtime 3D Asset Delivery
Other
7.07k stars 1.13k forks source link

Draco extension for point clouds #1809

Open lilleyse opened 4 years ago

lilleyse commented 4 years ago

KHR_draco_mesh_compression has this restriction on geometry types:

When using this extension, the mode of primitive must be either TRIANGLES or TRIANGLE_STRIP and the mesh data will be decoded accordingly.

The Draco bitstream supports point cloud compression but POINTS support didn't make it into the glTF extension. For point clouds we see a 2.4x size reduction compared to the 16-bit quantized data (KHR_mesh_quantization) and it would be great to take advantage of this in glTF. Source on those numbers here - and note, this was tested with a Draco point cloud extension specific to 3D Tiles but results should be the same for glTF.

We're in the process of moving all 3D Tiles formats to glTF, point clouds included, and this would be a welcome extension. Are others interested in this?

lilleyse commented 4 years ago

For the actual extension, I wonder if it could be as simple as allowing the glTF to override the mode restriction and use 0 (POINTS). Possibly no schema changes, the glTF would just need to include the extension in extensionsUsed/extensionsRequired. I'm not sure if this is considered good practice, but throwing it out there.

zeux commented 4 years ago

An alternative solution to this is #1702 which you can try by using gltfpack; make sure to match position quantization settings with Draco though since I believe Draco uses less than 16 bits by default.