# GlTFLoader will copy extra empty nodes during loading

**URL:** <https://forum.babylonjs.com/t/gltfloader-will-copy-extra-empty-nodes-during-loading/55463>\
**Category:** Bugs\
**Tags:** gltffileloader\
**Created:** [December 19, 2024, 10:12am UTC](https://forum.babylonjs.com/t/gltfloader-will-copy-extra-empty-nodes-during-loading/55463 "2024-12-19T10:12:41Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![brightMoon](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/brightmoon/32/9959_2.png) [@brightMoon](https://forum.babylonjs.com/u/brightMoon)\
**Post date:** [December 19, 2024, 10:12am UTC](https://forum.babylonjs.com/t/gltfloader-will-copy-extra-empty-nodes-during-loading/55463/1 "2024-12-19T10:12:41Z")

</div>

When exporting the model using Sandbox, there will be duplicate empty nodes appearing when reloading.

This is the original sandbox URL:  
[https://sandbox.babylonjs.com/?assetUrl=https://models.babylonjs.com/alien.glb](https://sandbox.babylonjs.com/?assetUrl=https://models.babylonjs.com/alien.glb)

Loading the original Sandbox model:

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/b/d/bd5182662cc9ed6f437f6e2ffbeb02d3db929776.png)

Reload the exported model using Sandbox：

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/a/5/a5f8960c45d5db8e30eb79d59e64017972b312e0.png)

Is this reasonable?

---

<div class="post-metadata">

**Author:** ![Cedric](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/cedric/32/2742_2.png) [@Cedric](https://forum.babylonjs.com/u/Cedric)\
**Post date:** [December 19, 2024, 1:53pm UTC](https://forum.babylonjs.com/t/gltfloader-will-copy-extra-empty-nodes-during-loading/55463/2 "2024-12-19T13:53:39Z")

</div>

cc @alexchuber

---

<div class="post-metadata">

**Author:** ![alexchuber](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/alexchuber/32/52000_2.png) [@alexchuber](https://forum.babylonjs.com/u/alexchuber)\
**Post date:** [December 19, 2024, 4:36pm UTC](https://forum.babylonjs.com/t/gltfloader-will-copy-extra-empty-nodes-during-loading/55463/3 "2024-12-19T16:36:06Z")

</div>

It’s actually the loader introducing the duplicate nodes  
E.g., in the original glTF, there is only one node for “AlienHead”, but there are two in the scene hierarchy once imported. I assume this has to do with how we load skeletal animations? cc @ryantrem

---

<div class="post-metadata">

**Author:** ![alexchuber](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/alexchuber/32/52000_2.png) [@alexchuber](https://forum.babylonjs.com/u/alexchuber)\
**Post date:** [December 19, 2024, 4:40pm UTC](https://forum.babylonjs.com/t/gltfloader-will-copy-extra-empty-nodes-during-loading/55463/4 "2024-12-19T16:40:38Z")

</div>

It is true, though, that the exporter does its best to remove extra nodes created by the loader. Just not these-- they’d be messy to do at best.

---

<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:** [December 19, 2024, 9:41pm UTC](https://forum.babylonjs.com/t/gltfloader-will-copy-extra-empty-nodes-during-loading/55463/5 "2024-12-19T21:41:53Z")

</div>

This is by design at the moment.

See [glTF 2.0 Skinning | Babylon.js Documentation](https://doc.babylonjs.com/features/featuresDeepDive/importers/glTF/glTFSkinning/) near the bottom:

> Furthermore, the skinned mesh is allowed to have child nodes that have meshes or additional hierarchies. Thus, in additional to creating a skinned mesh, the glTF loader also creates a node that represents the glTF node with the skinned mesh, in case this node is animated or has additional child nodes.
