VAST-AI-Research/TripoSR

Can't view model with texture using .obj, with .glb I see the texture

Opened this issue · 5 comments

I am running:
python run.py featured_image.png --output-dir output/ --bake-texture --device cpu

I get a mesh.obj and a texture.png, but when viewing the model in windows viewer, or in blender I don't see the textures on the model.

I am missing an .mtl file, which threestudio generates. I tried creating one manually and still the textures don't load.

I am able to use the gradio app to do this and view the model.glb in the browser with texture applied, but can't see textures on the model.obj from gradio.

using this command I can see the textures
python run.py featured_image.png --output-dir output/ --device cuda:0 --model-save-format glb

I edited model.obj directly in notepad and referenced an mtl file I created. I created the mtl file to reference the texture file.

With this workaround of editing the file with a text editor, I can create .obj files that use textures. Previously I could only view the textures on .glb files.

Could u write the flow of changes?
So I can repeat it as well. As I experience the same.
Thanks in advance

Could u write the flow of changes?
So I can repeat it as well. As I experience the same.
Thanks in advance

I created an obj file and texture file with triposr. I then downloaded a zip with mesh.obj, mesh.mtl, texture.png that shows the model with texture correctly. [1]. I edited the top of the triposr created obj file to match the format of the downloaded obj file that displays textures. Then I created an mtl file using the downloaded example as reference using the triposr generated texture filename.

[1] https://wordcraft3d.s3.amazonaws.com/modified_2024-03-19_19-32-58.zip