# Weird imported/exported GLB structure

**URL:** <https://forum.babylonjs.com/t/weird-imported-exported-glb-structure/48489>\
**Category:** Questions\
**Created:** [March 4, 2024, 11:40am UTC](https://forum.babylonjs.com/t/weird-imported-exported-glb-structure/48489 "2024-03-04T11:40:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![thinh.pham](https://avatars.discourse-cdn.com/v4/letter/t/e5b9ba/32.png) [@thinh.pham](https://forum.babylonjs.com/u/thinh.pham)\
**Post date:** [March 4, 2024, 11:40am UTC](https://forum.babylonjs.com/t/weird-imported-exported-glb-structure/48489/1 "2024-03-04T11:40:26Z")

</div>

Hi guys,

I found a problem when importing/exporting GLTF model. My model has several nodes that contain sub-meshes that I exported it from Unity for testing. In Unity, PlayCanvas, and Blender, they all display the “single\_node\_multi\_submeshes\_\*” node as a single node (with sub-meshes) information, but in Babylonjs this node is displayed as a TransformNode with multiple mesh nodes in it.

In PlayCanvas  
 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/2/b/2ba75424a414b32e265e946813b3b5bb9ad659ae.png)

In Babylonjs  
 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/a/1/a1c7b5a9e96d442b3e8057a108f9871173c63647.png)

Then when exporting the imported file (GLB export function in Debug Layer), the exported file is not in the same structure as the original model file. The “single\_node\_multi\_submeshes\_\*” mesh is converted to GLTF’s node and its sub-meshes become individual meshes rather than primitives. This issue also happens in the newly created “box\_merged” which has 2 submeshes I created at runtime.

Check it out  
[GLB import and export - submeshes problem | Babylon.js Playground (babylonjs.com)](https://playground.babylonjs.com/#5LWV59#1)

Any suggestion?

---

<div class="post-metadata">

**Author:** ![Evgeni\_Popov](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evgeni_popov/32/4432_2.png) [@Evgeni\_Popov](https://forum.babylonjs.com/u/Evgeni_Popov)\
**Post date:** [March 4, 2024, 11:57am UTC](https://forum.babylonjs.com/t/weird-imported-exported-glb-structure/48489/2 "2024-03-04T11:57:53Z")

</div>

cc @bghgary

---

<div class="post-metadata">

**Author:** ![bghgary](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/bghgary/32/48532_2.png) [@bghgary](https://forum.babylonjs.com/u/bghgary)\
**Post date:** [March 4, 2024, 8:40pm UTC](https://forum.babylonjs.com/t/weird-imported-exported-glb-structure/48489/3 "2024-03-04T20:40:38Z")

</div>

This is a well-known problem with loading glTF into Babylon.js. It is unfortunately not a 1-to-1 mapping between the primitives of glTF and the submeshes in Babylon.js as it is currently implemented. We tried a few times in the past to make it work, but there were too many edge cases that failed. In the end, we decided to split them. Unfortunately, right now, there is no good solution for round-tripping glTF with multiple primitives at the moment with Babylon.js. It is something that has come up before, so maybe we can investigate a better solution for the next release.
