playcanvas / model-viewer

3D model viewer supporting glTF 2.0 and PLY (3d Gaussian Splats)
https://playcanvas.com/viewer
MIT License
439 stars 64 forks source link

PLY list of indices for face is not supported? #302

Open ComicAddict opened 2 months ago

ComicAddict commented 2 months ago

When a PLY file with list of vertex indices as for defining a face is fed for the online demo I get the following error:

image

The header of the file is the following:

ply
format binary_little_endian 1.0
element vertex 10
property double x
property double y
property double z
property uchar r
property uchar g
property uchar b
element edge 2
property int vertex1
property int vertex2
property double w1
property double w2
element face 10
property list int int vertex_index
property uchar red
property uchar green
property uchar blue
property double v
end_header

Same file can is readable with both Blender and MeshLab.

slimbuck commented 2 months ago

Hi @ComicAddict ,

Model-viewer currently supports PLY files containing 3d gaussian splatting scenes only.

For models we generally rely on glb/gltf.

May I ask why you're using PLY for meshes? We've not had a request to support PLY meshes before.

Thanks!

ComicAddict commented 2 months ago

Hi @slimbuck ,

I was checking out all the possible PLY viewers to see if there are some tools that can view the custom attributes. I have PLY files with custom per vertex, per face and per edge information. Are there any other file format that can support per face and per edge custom data?

slimbuck commented 2 months ago

Yes PLY is perfect for custom data and the only format I know of that supports this.

How would you expect the viewer to display the custom data? Show the values in a table or actually render the data on the 3d viewport?

ComicAddict commented 2 months ago

Overlaying text on top of the geometric element(vertex, edge, face) like how Blender is doing with geometry node viewer node: image

but if the dimensions of data is known we can display them as colours and choose which attribute to view at the moment with UI elements.