google / draco

Draco is a library for compressing and decompressing 3D geometric meshes and point clouds. It is intended to improve the storage and transmission of 3D graphics.
https://google.github.io/draco/
Apache License 2.0
6.46k stars 960 forks source link

Draco does not decode "high dimensional" point clouds #1020

Open SvenKratz opened 1 year ago

SvenKratz commented 1 year ago

I'm trying to apply draco to a "Gaussian Splatting" point cloud, which has many more dimensions than just point locations, e.g., here are the header fields:

ply
format binary_little_endian 1.0
element vertex 1167703
property float x
property float y
property float z
property float nx
property float ny
property float nz
property float f_dc_0
property float f_dc_1
property float f_dc_2
property float f_rest_0
property float f_rest_1
property float f_rest_2
property float f_rest_3
property float f_rest_4
property float f_rest_5
property float f_rest_6
property float f_rest_7
property float f_rest_8
property float f_rest_9
property float f_rest_10
property float f_rest_11
property float f_rest_12
property float f_rest_13
property float f_rest_14
property float f_rest_15
property float f_rest_16
property float f_rest_17
property float f_rest_18
property float f_rest_19
property float f_rest_20
property float f_rest_21
property float f_rest_22
property float f_rest_23
property float f_rest_24
property float f_rest_25
property float f_rest_26
property float f_rest_27
property float f_rest_28
property float f_rest_29
property float f_rest_30
property float f_rest_31
property float f_rest_32
property float f_rest_33
property float f_rest_34
property float f_rest_35
property float f_rest_36
property float f_rest_37
property float f_rest_38
property float f_rest_39
property float f_rest_40
property float f_rest_41
property float f_rest_42
property float f_rest_43
property float f_rest_44
property float opacity
property float scale_0
property float scale_1
property float scale_2
property float rot_0
property float rot_1
property float rot_2
property float rot_3
end_header

Draco seems to truncate all fields after the first six, assuming a coords + normals representation. Decoded header:

ply
format binary_little_endian 1.0
element vertex 1167703
property float x
property float y
property float z
property float nx
property float ny
property float nz
end_header

Are there any plans to make the approach more general to support "exotic" point clouds such as those used by Gaussian splatting?

ondys commented 10 months ago

This is a limitation of the ply decoder that is used in Draco. The point cloud compression itself supports arbitrary number of dimensions. A solution would be to parse the data on your end and initiate the draco::PointCloud data structure manually using the C++ api.