Open3D icon indicating copy to clipboard operation
Open3D copied to clipboard

Texture not displayed

Open JeremyMOUCHOUX opened this issue 2 years ago • 7 comments

Checklist

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 ...

JeremyMOUCHOUX avatar Mar 23 '22 17:03 JeremyMOUCHOUX

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.

JeremyMOUCHOUX avatar Mar 30 '22 14:03 JeremyMOUCHOUX

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.

JeremyMOUCHOUX avatar Mar 31 '22 16:03 JeremyMOUCHOUX

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 avatar Apr 12 '22 16:04 zkf1997

@zkf1997 Did you find a solution? I think this is the same issue: https://github.com/isl-org/Open3D/issues/5049

nickponline avatar May 09 '22 19:05 nickponline

@JeremyMOUCHOUX Are you able to provide example code? Sounds like a viable workaround until this is fixed.

jackakers13 avatar Jun 05 '22 17:06 jackakers13

glb file texture not showing

orshih6 avatar Dec 27 '22 06:12 orshih6

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)

lihaolin88 avatar Jan 18 '24 01:01 lihaolin88