mikedh / trimesh

Python library for loading and using triangular meshes.
https://trimesh.org
MIT License
3k stars 580 forks source link

Trimesh.Scene vs Trimesh.Trimesh as .obj import #1778

Open albertotono opened 1 year ago

albertotono commented 1 year ago

After I export the obj from Blender and then load in Trimesh,

Some obj are imported as:

Why is this happening, should I export the OBJ from Blender in a particular way? Should I import the obj differently? [ Right now I am using trimesh.load(path) ]

mikedh commented 1 year ago

Hey, yeah it depends on whether there are multiple materials or multiple o (object) directives in the OBJ. You can load with mesh = trimesh.load(file_name, force='mesh') or scene=trimesh.load(file_name, force='scene') to force it into a particular container type.