buaacyw / MeshAnythingV2

From anything to mesh like human artists. Official impl. of "MeshAnything V2: Artist-Created Mesh Generation With Adjacent Mesh Tokenization"
https://buaacyw.github.io/meshanything-v2/
Other
622 stars 33 forks source link

Error when loading .glb files. #10

Open Lucalme opened 2 months ago

Lucalme commented 2 months ago

I've notived that when using the live demo on HF or even when running locally, the app crashes pretty fast when loading a .glb file. This should not be so much of a issue, since converting .glb to .obj is relatively easy. but I thought it was worth noting.

Lucalme commented 2 months ago

File "E:\Softs\AI Stuff\MeshAnythingV2\mesh_to_pc.py", line 28, in export_to_watertight scaled_vertices, to_orig_center, to_orig_scale = normalize_vertices(normalized_mesh.vertices) AttributeError: 'Scene' object has no attribute 'vertices'

Zeina-T commented 2 months ago

Hi @Lucalme I also faced this issue and solved it by changing this line and adding force='mesh' to force extract the mesh from the scene. So the line becomes: input_mesh = trimesh.load(input_3d, force="mesh")

Hope this helps!