Reputation: 1
I want to ask how can I transfer vertices color from point cloud to mesh.
I have a procedure where I transfer a point cloud to a mesh and the mesh is back visualized as a point cloud using three.points. This is because of certain optimizations for 3D that I don't want to explain here. The problem is that when I want to visualize my model in three.points, that model has only one color. The console throws an error that it can't find any vertex color attribute. I am using .glb format with draco compression. Can you point me in the direction of what I'm doing wrong? Is there any way to verify that the model contains vertices color (I mean mesh)? My point is simply this: i have a point cloud (contains vertices color) - i convert it to mesh and visualize the mesh with three.points, but i need to keep three.js to render my points again with the color that the original point cloud had. it is clear to me that there will be a generalization between converting the point cloud to mesh, so the base point cloud and then the model in three.point will not be terribly different according to the contour...
Upvotes: 0
Views: 310
Reputation: 31036
Is there any way to verify that the model contains vertices color (I mean mesh)?
For testing purposes export to .glTF (not glb) so you can open the glTF JSON manifest file with a text editor. You can then inspect the meshes
section and make sure the respective mesh has a COLOR_0
definition in its attributes
section. If it is missing, vertex colors are not defined in the asset. Color data maybe got lost during the glTF export or during the DRACO compression.
Upvotes: 0