Closed dtgfdgfgf closed 1 year ago
I made it with some clue in /commom/utils/vis.py, function render_mesh().
import trimesh mesh = out['smplx_mesh_cam'].detach().cpu().numpy()[0] mesh_fix = trimesh.Trimesh(mesh, smpl_x.face) rot = trimesh.transformations.rotation_matrix(np.radians(180), [1, 0, 0]) mesh_fix.apply_transform(rot) save_obj(mesh_fix.vertices, smpl_x.face, "%s/obj%d.obj"%(obj_path, cnt))
The output.obj in /demo is upside down, and so is my own output.obj I have to use these .obj to do other work, so I am wondering that how to flip the obj