-
Notifications
You must be signed in to change notification settings - Fork 570
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exported mesh as .obj appears as solid black color by default #843
Comments
Gotcha so the color is exporting from trimesh, it just doesn't show up by default in blender? If that's the case it is probably best resolved from the Blender side, I don't know how much we can do about that at export time. Although if you have an example of a file that behaves as you expect happy to take a look and tweak trimesh's export format! |
Hi,
I also tried to visualize the exported mesh in MeshLab API and it appears in solid black color. The trimesh version used for exporting is 3.6.38 (older). Let me know if there are any solutions or alternatives. |
Hey, I think this is probably related to the MTL/images not being written. There was a pretty recent change to try to simplify this when users export to a path. You might try upgrading to the latest version of trimesh (
|
Hi, |
Ah, I think this is actually the |
Hi,
I am trying to export a mesh as .obj. The code looks like this:
export, texture = trimesh.exchange.obj.export_obj(mesh, include_color=True, include_texture=True)
with trimesh.util.TemporaryDirectory() as path:
obj_path = os.path.join('', 'file_name.obj')
with open(obj_path, 'w') as f:
f.write(export)
for k, v in texture.items():
with open(os.path.join('', k), 'wb') as f:
f.write(v)
When this obj is loaded again, the model appears in solid black color. As expected the mesh must conserve its color coordinates. I also tried to visualize it in blender API and it displays the mesh in black color by default (as seen in the below image).
I get the colored model only after changing the mode (display rendered preview in blender api). Could you please tell me how I can get the colored model by default when I load the exported mesh?
Used trimesh version:
3.6.38
Thank you!
The text was updated successfully, but these errors were encountered: