trimesh icon indicating copy to clipboard operation
trimesh copied to clipboard

OBJ group name

Open panangam opened this issue 4 years ago • 3 comments

The software I'm using exports separate meshes in obj file as groups ('g' prefix lines). Trimesh seems to be able to parse that, but I need to be able to access the group names (following the 'g'). Does Trimesh support this? For reference, here's what the file looks like

g {group name}
v 1 2 3
...
usemtl {material}
f 1 2 3
...
g {group name 2}
...
...

panangam avatar Oct 21 '20 21:10 panangam

I ran into this issue as well. trimesh.load can indeed read individual objects into a scene but as far as I can tell, the names of the objects are lost. However the objects can be accessed via the geometry attribute of the scene. I think preserving names would be a very useful feature to have.

vaibhavnayel avatar Nov 23 '20 14:11 vaibhavnayel

@mikedh Can I ask for your thought? What might be a good way to solve this? I can try to do the work myself.

panangam avatar Apr 01 '21 16:04 panangam

Any improvements on this topic?

abaldacci avatar Jan 12 '22 14:01 abaldacci