InstantMesh icon indicating copy to clipboard operation
InstantMesh copied to clipboard

texture problem

Open AzizAydin97 opened this issue 9 months ago • 6 comments

thanks for the great work. i have a problem when I am running the code on colab environment . the results given doesn't include the texture of the body. however , when I use the code on huggingface it give me the results with a textured 3d structure as shown in the below figure. Screenshot 2024-05-05 213932

when I use the code on colab it only give me this result image which has no texture.

please can you help me

thanks

AzizAydin97 avatar May 05 '24 18:05 AzizAydin97

please i would appreciate your respond

AzizAydin97 avatar May 07 '24 14:05 AzizAydin97

How did you visualize the mesh? The huggingface demo exports a mesh with vertex color, while the colab script exports a mesh with texture map. Do you have the .mtl file and .png texture map under the same path with the `.obj' mesh?

bluestyle97 avatar May 07 '24 16:05 bluestyle97

How did you visualize the mesh? The huggingface demo exports a mesh with vertex color, while the colab script exports a mesh with texture map. Do you have the .mtl file and .png texture map under the same path with the `.obj' mesh?

i visualized the model in windows using 3D viewer yes. actually i have the .PNG, .mtl, and .obj files together . they're generated. but i want to get the .obj file with colors and texture as the output in hugging face. or do i have to combine the .obj file alongside with the. mtl file ? i would appreciate your answer

AzizAydin97 avatar May 07 '24 18:05 AzizAydin97

@bluestyle97 can we play with render_resolution: 512 ? to get better resolution ?

sumanttyagi avatar May 08 '24 08:05 sumanttyagi

Originally, obj file does not implemented texture. For texture embedding, should convert obj to ply or glb. To convert .obj files to other formats like .ply or .glb can be done with libraries such as trimesh, pyrender, and pygltflib

import trimesh

# Load the .obj file
mesh = trimesh.load('model.obj')

# Export to .ply
mesh.export('model.ply')

if you need more help, please contact me.

christopi avatar Aug 01 '24 16:08 christopi

hey @trueices thanks for the response, but is there a way we could integrate the obj,mtl and the png file to generate a colored mesh instead. could you provide a simple working code , thanks

AbhinavJangra29 avatar Aug 20 '24 15:08 AbhinavJangra29