I have a Blender scene in which objects are organized into collections.
When I export the scene in gltf format and import it in my Three.js project there is no track of these collections.
What I expected was that for each collection correspond a group.
How can I get this result? Is it possible?
I think the most robust way may be to create one Empty object per collection in Blender, and use it as the parent of the rest of the contents of its collection. Give it a name that you'll be able to look up from the ThreeJS side.
In glTF there are no "collections" per se, but there is a parent/child hierarchy of nodes, and you can use that for grouping purposes.
As a side note, glTF does support multiple "scenes", but I don't recall if the exporter will write out multiple Blender scenes as such. Most glTF readers don't do a good job of reading that anyway. I suspect that using Empty nodes as parents of groups to organize things will be the more well-tested code path.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With