isl-org / isl-org/Open3D

write_triangle_mesh with textured OBJ

Open
#1,731 8 comments 0 reactions 1 assignee Claimed by @theNded View on GitHub
bug io mesh texture
Dominant language
C++
Stars
14k
Forks
2.6k
Avg merge
5d 18h
Merged PRs (30d)
6

Description

I'm running a simple I/O test for my textured OBJ mesh file using this code:
```
import open3d as o3d

def visualize(mesh):
vis = o3d.visualization.Visualizer()
vis.create_window()
vis.add_geometry(mesh)
vis.run()
vis.destroy_window()

textured_mesh = o3d.io.read_triangle_mesh("input.obj")
visualize(textured_mesh) # The mesh looks fine here
o3d.io.write_triangle_mesh("output.obj", textured_mesh, write_triangle_uvs=True)
textured_mesh = o3d.io.read_triangle_mesh("output.obj")
visualize(textured_mesh) # The mesh looks broken here
```

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:

![image](https://user-images.githubusercontent.com/61182488/79844194-a34bd380-83bb-11ea-8d61-4d60b0a8051b.png)

The textures are not mapped correctly but also the mesh itself is rasterized in some strange way.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.