Open3D
Open3D copied to clipboard
Texture not displayed
Checklist
- [x] I have searched for similar issues.
- [x] For Python issues, I have tested with the latest development wheel.
- [x] I have checked the release documentation and the latest documentation (for master branch).
Describe the bug Exactly the same as https://github.com/isl-org/Open3D/issues/1387. When using o3d.io.read_triangle_mesh() with obj files. the mtl texture IS loaded, but visualizer shows vanilla color on the 3D model. The mesh infos show that the texture has been loaded: textures: [Image of size 0x0, w...ffer data., Image of size 2048x2...ffer data.] triangle_material_ids: IntVector[1, 1, 1, 1, 1, 1, 1, 1, 1, ...,1 ]
To Reproduce Steps to reproduce the behavior: Exactly the same as https://github.com/isl-org/Open3D/issues/1387
Expected behavior After loading obj, and using visualizer to view geometry, the mesh should show texture (color).
Screenshots Exactly the same as https://github.com/isl-org/Open3D/issues/1387
Environment (please complete the following information): Operating system: Windows 10 Python version: Python 3.7.7 & 3.10.0 (I tried on both) Open3D version: 0.15.2 Is this remote workstation? no How did you install Open3D?: pip install open3d & from source following the guide (I tried both) http://www.open3d.org/docs/latest/compilation.html Compiler version (if built from source): Microsoft Visual Studio 17.1 2022
I would like to know if it comes from my setup or if it is a common problem. And if it comes from my setup, if someone has any clue to solve that ...
I finally had to import the .obj file "by hand", reading it as a text file and then it worked. So the visualization works. The problem seems to be on the side of the loader.
By experimenting a bit more, I managed to display a texture by removing the empty texture of the mesh and deleting all faces using this material_id (through my own .obj importer). I suppose that the visualizer does not handle empty textures and gives up on displaying any of them.
I also get into the problem that the default visualizer shows untextured mesh loaded from obj file. I find the texture and materials are loaded but the visualizer cannot display the texture. However, I find o3d.visualization.draw can correctly show the textures.
@zkf1997 Did you find a solution? I think this is the same issue: https://github.com/isl-org/Open3D/issues/5049
@JeremyMOUCHOUX Are you able to provide example code? Sounds like a viable workaround until this is fixed.
glb file texture not showing
glb file texture not showing
add enable_post_processing=True when you read file, mesh = o3d.io.read_triangle_mesh(path, enable_post_processing=True)