When visualizing a 3d object from lidar data, the colors are included and mapped to the correct location. Mesh Rendered with color in open3d.visualization()
o3d.visualization.draw_geometries([voxelMesh])
However, when I go to write this exact mesh to an object, the color is not included and it appears gray, with no .mtl file included. I cannot figure out why this is happening and how to fix it. .obj file created by open3d.io.write_triangle_mesh()
meshTransformed = np.array([[1, 0, 0, 0], [0, 0, 1, 0], [0, -1, 0, 0], [0, 0, 0, 1]])
o3d.io.write_triangle_mesh(outputPath, voxelMesh.transform(meshTransformed), write_triangle_uvs=True)
What I don't understand is how the mesh has the color, and works perfectly within the Open3D viewer window but the colors do not export when the .obj file is created, even with write_triangle_uvs=True.
EDIT
So, when the program is executed, there is no MTL file with the .obj file that would include the textures. Output object file created by open3d. If you open the file created it is still in black and white.Open the file in any 3d viewer: i.e. Blender, Maya, Microsoft 3d You will see there is no texture included with it.