vchoutas / smplify-x

Expressive Body Capture: 3D Hands, Face, and Body from a Single Image
https://smpl-x.is.tue.mpg.de/
Other
1.75k stars 336 forks source link

Has anyone encountered the issue of inverted meshes generated from pose? #202

Open zjutcaicai opened 1 year ago

zjutcaicai commented 1 year ago

When I generate meshes from the pose in the pkl file,the entire person is upside down.The overall y and z axes are reversed. How can I handle the pose to make it normal? I need to retain the pose for some reasons. thank you.

athena913 commented 1 year ago

If you are using the following to generate the mesh from the pose in the pkl file, you can comment the 2nd line that uses the rotation_matrix.

out_mesh = trimesh.Trimesh(vertices, body_model.faces, process=False)
        rot = trimesh.transformations.rotation_matrix(
            np.radians(180), [1, 0, 0])
        out_mesh.apply_transform(rot)
        out_mesh.export(mesh_fn)
zjutcaicai commented 1 year ago

Thanks!I already know this code. I hope to rotate the pose instead of the final obj. This is very difficult for me, because it seems to involve Euler angles