Open PiotrRzRobotec opened 8 months ago
I have a problem with saving generated mesh as ply with vertex color. I can visualize proper colors with:
vis.show_3d([vis.mesh(mesh.v, mesh.f, color=mesh.c)], [pcd])
but I don't know how to save vertex color information with a mesh. I'm able to create a ply file with this:
vis.to_file(vis.mesh(mesh.v, mesh.f, color=mesh.c), "../assets/final.ply")
but I don't have vertex color in it.Is it possible to do it?
your points cloud have color? you can read like this
pcd = o3d.io.read_point_cloud("input.ply")
input_xyz = torch.from_numpy(np.asarray(pcd.points)).to(torch.float)
input_color = torch.from_numpy(np.asarray(pcd.colors)).to(torch.float)
input_normal = torch.from_numpy(np.asarray(pcd.normals)).to(torch.float)
Thank you for the answer. Yes, my point cloud has color and already I am reading point cloud like that.
However, I realized it was an issue in Blender where I was trying to load exported ply.
vis.to_file(vis.mesh(mesh.v, mesh.f, color=mesh.c)
was working from beginning, everything is fine now
I have a problem with saving generated mesh as ply with vertex color. I can visualize proper colors with:
vis.show_3d([vis.mesh(mesh.v, mesh.f, color=mesh.c)], [pcd])
but I don't know how to save vertex color information with a mesh. I'm able to create a ply file with this:
vis.to_file(vis.mesh(mesh.v, mesh.f, color=mesh.c), "../assets/final.ply")
but I don't have vertex color in it.Is it possible to do it?