Commit
·
6a7c61b
1
Parent(s):
e0263b2
Update mesh export in CRM model to use GLB format with correct vertex and face transformations. This change enhances compatibility and improves file handling by exporting to a .glb file instead of .obj.
Browse files- model/crm/model.py +2 -2
model/crm/model.py
CHANGED
@@ -107,8 +107,8 @@ class CRM(nn.Module):
|
|
107 |
|
108 |
# export the final mesh
|
109 |
with torch.no_grad():
|
110 |
-
mesh = trimesh.Trimesh(
|
111 |
-
mesh.export(f
|
112 |
|
113 |
def export_mesh_wt_uv(self, ctx, data, out_dir, ind, device, res, tri_fea_2=None):
|
114 |
|
|
|
107 |
|
108 |
# export the final mesh
|
109 |
with torch.no_grad():
|
110 |
+
mesh = trimesh.Trimesh(vertices=v_np, faces=f_np, process=False) # important, process=True leads to seg fault...
|
111 |
+
mesh.export(f"{out_dir}.glb", file_type="glb")
|
112 |
|
113 |
def export_mesh_wt_uv(self, ctx, data, out_dir, ind, device, res, tri_fea_2=None):
|
114 |
|