Open tempaccountforissue opened 1 year ago
@tempaccountforissue , I was just about to file an issue on this very topic since I'm having the same problem. Thinking it might be an issue with my point cloud (generation) to mesh conversion code, I tried converting the example .npz files provided by the point-e team in the banner_pcs.zip to .ply files and had the same result.
Importing .ply files to Blender and running them through the provided evals/scripts/blender_script.py both yield monochromatic meshes.
I extracted one of my self-generated .npz files and confirmed that they have RGB data in them, e.g.
npz file data:
coords
[[ 0.35535112 0.2274497 0.09269581]
[ 0.04728121 -0.12379898 0.40500367]
[-0.32376817 0.2836825 0.0467868 ]
...
[ 0.41286856 0.10946465 0.03661382]
[-0.09848484 0.41358858 -0.11891422]
[-0.29697058 -0.2978952 -0.20843448]]
R
[0.73333335 0.4784314 0.73333335 ... 0.7137255 0.73333335 0.7607844 ]
G
[0.00392157 0.00392157 0.00784314 ... 0.02352941 0.01176471 0.54509807]
B
[0.3921569 0.00784314 0.3921569 ... 0.38431376 0.39607847 0.0509804 ]
I had the same problem and I solved it by creating a function to calculate faces channels (I noticed that the generated trimesh only had verts channels, even if I'm not 100% sure this was a problem) and by downloading the mesh in a .glb file format.
Here is the link to the colab project (I modified the CGMatter point-e project): https://colab.research.google.com/drive/1OZUjjX5tklkNwgHxUlDBpj61VG2w87ka?usp=sharing
P.S. it will return an error at the "from trimesh.trimesh import Trimesh" line, read the comment before that line to solve this
@NicolasLorenzi Nice! I got it to work with the .glb file, but for the purposes of my project I'd need it in a .obj file. I tried converting the .glb to .obj but the new .obj mesh had no color. Do you know any way to get it to work with the .obj file?
Do you know any way to get it to work with the .obj file?
Just a thought if you are still stuck: I managed to get vertex colors out of a PLY mesh using Blender as a converter to OBJ format. Maybe you can use Blender to convert your .glb to OBJ ?
@NicolasLorenzi Nice! I got it to work with the .glb file, but for the purposes of my project I'd need it in a .obj file. I tried converting the .glb to .obj but the new .obj mesh had no color. Do you know any way to get it to work with the .obj file?
I've been struggling on this too, but i eventually found a github comment talking about this problem (https://github.com/isl-org/Open3D/issues/4773#issuecomment-1074542834)
Here's another version of the old google colab project in which you can also download the 3d object model (.obj, .ply, ...) and texture (.png) https://colab.research.google.com/drive/1Ok3ye2xWsuYOcmbAU3INN7AHy5gvvq5m?usp=sharing
Edit: The generated mesh has a lot of triangles and significantly reduces performance because it takes a lot of time to be rendered, I found this simple tutorial to reduce the triangles count using blender https://youtu.be/1UF9d5H6Ids
PointCloud2Mesh produces mesh with no color. I've tried adding
fill_vertex_channels=True
inside ofmesh = marching_cubes_mesh(
but it still won't work. Any help?