Open RaabeM opened 1 year ago
Hi everyone, I am doing vision research in mujoco. Therefore I want to import ShapeNet meshes into mujoco. Unfortunately this error appears:
Error: faces have inconsistent orientation
So what I would like to do is the following:
Simply import the .obj (1), concat the subgroups with this thread (2) and export the mesh to a new .obj (4) does not help to fix the error massage.
Do you guys have any idea, what I could do? Thanks in advance!
Currently my code looks like this:
import trimesh mesh = trimesh.load(PATH+FILE) print(type(mesh))
trimesh.scene.scene.Scene dump = mesh.dump() concat = dump.sum() print(type(concat)) trimesh.base.Trimesh resolver = trimesh.resolvers.FilePathResolver(PATH) output = trimesh.exchange.obj.export_obj(concat, resolver=resolver) file = open(PATH + 'test.obj', 'w') file.write(output) file.close()
trimesh.scene.scene.Scene
dump = mesh.dump() concat = dump.sum() print(type(concat))
trimesh.base.Trimesh
resolver = trimesh.resolvers.FilePathResolver(PATH) output = trimesh.exchange.obj.export_obj(concat, resolver=resolver) file = open(PATH + 'test.obj', 'w') file.write(output) file.close()
Did you try mesh.fix_normals()?
mesh.fix_normals()
Hi everyone, I am doing vision research in mujoco. Therefore I want to import ShapeNet meshes into mujoco. Unfortunately this error appears:
Error: faces have inconsistent orientation
So what I would like to do is the following:
Simply import the .obj (1), concat the subgroups with this thread (2) and export the mesh to a new .obj (4) does not help to fix the error massage.
Do you guys have any idea, what I could do? Thanks in advance!
Currently my code looks like this: