I'm trying to export a point cloud and am running into an issue where my files are not being accepted by 3rd party tools.
I can not find a concrete example of a valid PLY point cloud file with color data embedded (I only saw binary files with color data). I pieced this together from different sources, but when I export a file with this header, I can not display it on a Mac, or view it in a web based viewer
property list uchar int vertex_indices
required?\n
or both \r\n
at the end of each line?my header:
ply
format ascii 1.0
element vertex \(vertexCount)
property float x
property float y
property float z
property uchar red
property uchar green
property uchar blue
property uchar alpha
element face 0
property list uchar int vertex_indices
end_header
0.391046 0.00335238 -1.0231568 114 110 94 255
0.39227518 0.0033548833 -1.0226241 114 111 93 255
// no faces
Web based viewer does load files like these (but I do not see those type definitions in these docs: http://paulbourke.net/dataformats/ply/ :
ply
format ascii 1.0
element vertex 2
property float32 x
property float32 y
property float32 z
element face 13594
property list uint8 int32 vertex_indices
end_header
1.13927 0.985002 0.534429
1.11738 0.998603 0.513986
3 0 1 2
3 0 2 3
//...
3 6539 6367 6736
3 6539 6736 6905
This format was accepted by the point cloud library PLY reader:
ply
format ascii 1.0
element vertex \(vertexCount)
property float x
property float y
property float z
property uint8 red
property uint8 green
property uint8 blue
end_header
-0.089456566 0.21365404 -0.7840536 81 51 19
-0.0884854 0.21366915 -0.7838928 82 52 20