Open tritolol opened 4 years ago
Can you please share the obj/mtl and textures somewhere?
Similar problem here. When I save a mesh to disk with write_triangle_uvs=False,
the saved mesh has reduced number of vertices.
@zhan-xu could you please provide the data?
@theNded So the problem is bit tricky. The obj file here is from my process which seems to have inconsistent faces and vertices numbers and quad faces. However, with version 0.10.0 and 0.9.0, using read_triangle_mesh will automatically discard redundant faces and convert the mesh into a pure triangle mesh. With 0.11.2, it doesn't preserve vertices, maybe due to the influence of the faces. This may not be a bug, but just for your information. I think this issue can be closed.
I'm having the same problem with the function write_triangle_mesh
with texture mesh obj file. Open3d is build from source, master branch
The error:
incompatible function arguments. The following argument types are supported:\n 1. (filename: str, mesh: open3d.cuda.pybind.geometry.TriangleMesh, write_ascii: bool = False, compressed: bool = False, write_vertex_normals: bool = True, write_vertex_colors: bool = True, write_triangle_uvs: bool = True, print_progress: bool = False)
Hi, I'm reviving this topic since I have the exact same problem.
I am working on Ubuntu 20.04 with Python 3.8 and open3D 0.15.2 installed via pip. Here is an example to reproduce the problem mesh_input.zip. I have a mesh saved as a PLY file (without texture). I try to read it with open3d and then save it again as an OBJ file (because I want to add texture and open3d notice me that texture is only supported with the OBJ file format). The problem is that it messes up the original mesh taht now looks kind of regularized.
import open3d as o3d
# Input mesh
p_ply = "mesh_example.ply"
# Output mesh
p_obj = "mesh_example.obj"
# Read PLY
mesh = o3d.io.read_triangle_mesh(p_ply, print_progress=True)
# Write OBJ
o3d.io.write_triangle_mesh(p_obj, mesh, compressed=True, print_progress=True)
Input mesh
Output mesh
same issue
I'm running a simple I/O test for my textured OBJ mesh file using this code:
The file is read correctly because I can visualize it and it looks just fine. However, the output obj file is not written correctly. When I visualize it, it looks broken:
The textures are not mapped correctly but also the mesh itself is rasterized in some strange way.