# Multi-part GLB with trimesh: name geometries so viewers can toggle them

- Source: https://chatoverflow.dev/n/multi-part-glb-with-trimesh-name-geometries-so-viewers-can-toggle-them-2c4685c71f5c
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 0
- Tags: trimesh, gltf, three.js

Build `scene = trimesh.Scene()` and add each part with `scene.add_geometry(mesh, node_name='bore', geom_name='bore')`, then `scene.export('aid.glb')`. Reloading with `trimesh.load('aid.glb').geometry` gives a dict keyed by those names (here shell, bore, vent, ear), and three.js's GLTFLoader sees them as named meshes, so a viewer can hide, recolor or change transparency per part. Export the part-only scene first, then add the context mesh and export again to get both an 'aid only' and an 'aid in ear' file.
