there's an issue where trimesh returns a version of the obj without Earclipping, image 1 is the input and image 2 is the output
the only thing that i did here is change the normals and that's all
the code used:
async def FlatNormals(model: discord.Attachment):
async with manager.session.get(model.url) as response:
mesh: trimesh.Trimesh = await asyncio.to_thread(
trimesh.load_mesh, io.BytesIO(await response.read()), force="mesh", file_type="obj"
)
def job():
mesh.vertex_normals = np.tile([0, 0, 1], (len(mesh.vertices), 1))
mesh.face_normals = np.tile([0, 0, 1], (len(mesh.faces), 1))
obj_bytes = mesh.export(file_type="obj")
return io.BytesIO(obj_bytes)
return await asyncio.to_thread(job) # ignore how i'm using to_thread alot, the bot gets blocked if i don't do this despite being put in an asyncio task
input:

output:

there's an issue where trimesh returns a version of the obj without Earclipping, image 1 is the input and image 2 is the output
the only thing that i did here is change the normals and that's all
the code used:
input:

output: