pytorch3d
pytorch3d copied to clipboard
is there any undocumented function to recalculate the face normals for consistency?
🚀 Feature
recalculate the face normals for consistency NOTE: Please look at the existing list of Issues tagged with the label 'enhancement`. Only open a new issue if you do not see your feature request there.
Motivation
sometimes there are wrong ordered face indices in mesh files (e.g., OFF file store vertex index to represent face). Directly rendering them generates wrong images that have non-interpolation-like texture. It will be great if there are functions to make the face normals consistent (i.e., all pointing outside or inside of a object), so that the rendered images have better looks.
Pitch
the function may looks like:
meshes.make_face_normals_consistency()
NOTE: we only consider adding new features if they are useful for many users.
I would really love this as well. Is there a common way to do this "manually" with PyTorch3D's Mesh objects?
you could load the file via python library trimesh and then use the function trimesh.repair.fix_inversion and then convert trimesh to pytorch3d mesh