# BABYLON.SceneLoader.ImportMesh always create an extra mesh

**URL:** <https://forum.babylonjs.com/t/babylon-sceneloader-importmesh-always-create-an-extra-mesh/39009>\
**Category:** Bugs\
**Tags:** glb\
**Created:** [March 14, 2023, 4:19am UTC](https://forum.babylonjs.com/t/babylon-sceneloader-importmesh-always-create-an-extra-mesh/39009 "2023-03-14T04:19:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![yuripourre](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/yuripourre/32/26111_2.png) [@yuripourre](https://forum.babylonjs.com/u/yuripourre)\
**Post date:** [March 14, 2023, 4:19am UTC](https://forum.babylonjs.com/t/babylon-sceneloader-importmesh-always-create-an-extra-mesh/39009/1 "2023-03-14T04:19:27Z")

</div>

The method BABYLON.SceneLoader.ImportMesh always create and extra mesh in addition to the meshes. The first mesh seems to be a dummy mesh.

It not only causes extra use of memory but also gets really confusing when you need to pick a certain mesh by index.

The playground below prints the number of meshes, in this case it shoud be 1 but it prints 2. Every model that I tried has the same issue.

> **[Babylon.js Playground](https://playground.babylonjs.com/#YIU90M%23961)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL 3D scenes

---

<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 14, 2023, 10:40am UTC](https://forum.babylonjs.com/t/babylon-sceneloader-importmesh-always-create-an-extra-mesh/39009/2 "2023-03-14T10:40:22Z")

</div>

This mesh is created when you load a .gltf/.glb file to take care of the handedness: gltf files are right handed whereas Babylon.js is left handed, so there’s a special transformation on this node (named ` __root__ `) that transforms the geometry from left to right handed.

> [@yuripourre](#):
>
> when you need to pick a certain mesh by index.

It is preferable to access meshes by name or by id (`scene.getMeshByName` / `scene.getMeshById`) because the order of the meshes in the returned array may change depending on how the file was exported / what data is in the file.

---

<div class="post-metadata">

**Author:** ![yuripourre](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/yuripourre/32/26111_2.png) [@yuripourre](https://forum.babylonjs.com/u/yuripourre)\
**Post date:** [March 14, 2023, 4:48pm UTC](https://forum.babylonjs.com/t/babylon-sceneloader-importmesh-always-create-an-extra-mesh/39009/3 "2023-03-14T16:48:21Z")

</div>

@Evgeni_Popov Thank you for the explanation, I wasn’t aware of that.

That changes a lot on my side, because I was relying on index but at least now I know why some strange behaviors were happening.

If it’s by design, I will close it.
