# Thin Instances - GLB Models

**URL:** <https://forum.babylonjs.com/t/thin-instances-glb-models/55795>\
**Category:** Questions\
**Created:** [January 6, 2025, 11:02pm UTC](https://forum.babylonjs.com/t/thin-instances-glb-models/55795 "2025-01-06T23:02:13Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nicolas\_Bulgarides](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/nicolas_bulgarides/32/43640_2.png) [@Nicolas\_Bulgarides](https://forum.babylonjs.com/u/Nicolas_Bulgarides)\
**Post date:** [January 6, 2025, 11:02pm UTC](https://forum.babylonjs.com/t/thin-instances-glb-models/55795/1 "2025-01-06T23:02:13Z")

</div>

Hi Folks!

I’m trying to get thin instances working for GLB models and have tried about 10 things and haven’t been able to get it to work. I think there is a subtle error in this code but I don’t know what it is.

I did in fact check the docs for both instances and thin instances.

In the below example, the thin instances works for spheres. But the moment I comment out sphere (“loadedModel”) and substitute it for a mesh, and use the lines below specifically for .gltf / .glb models , it no longer works. Also, without doing the instances, the model loads correctly, so it isn’t the model. I think its probably a 3 - 5 line code fix. Is there anyone willing to help me figure out how to correctly do thin instances of .GLB models?

loadedModel.isVisible = false;  
loadedModel.setParent(null);

[https://doc.babylonjs.com/features/featuresDeepDive/mesh/copies/thinInstances/](https://doc.babylonjs.com/features/featuresDeepDive/mesh/copies/thinInstances/)

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

---

<div class="post-metadata">

**Author:** ![Deltakosh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/deltakosh/32/26635_2.png) [@Deltakosh](https://forum.babylonjs.com/u/Deltakosh)\
**Post date:** [January 7, 2025, 12:18am UTC](https://forum.babylonjs.com/t/thin-instances-glb-models/55795/2 "2025-01-07T00:18:04Z")

</div>

the `ImportMeshAsync` function is async so you have to await it:

```auto
var loadedModels = await BABYLON.SceneLoader.ImportMeshAsync(

```

And thus flag the root function as async:

```auto
var createScene = async function() {

```

and loadedModels is a list so:

```auto
const loadedModel = loadedModels.meshes[0];

```

[Thin instances test | Babylon.js Playground](https://playground.babylonjs.com/#V1JE4Z#223)

---

<div class="post-metadata">

**Author:** ![Nicolas\_Bulgarides](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/nicolas_bulgarides/32/43640_2.png) [@Nicolas\_Bulgarides](https://forum.babylonjs.com/u/Nicolas_Bulgarides)\
**Post date:** [January 7, 2025, 12:32am UTC](https://forum.babylonjs.com/t/thin-instances-glb-models/55795/3 "2025-01-07T00:32:36Z")

</div>

> [@Deltakosh](#):
>
> `const loadedModel = loadedModels.meshes[0];`

@Deltakosh

Hi sir,

Thanks for your response. I looked at the Playground you linked and checked the code in it and it still only appears to show one instance instead of two.

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

Can you see if I made a mistake and if so where it is? Sorry for the trouble.

---

<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:** [January 7, 2025, 9:26am UTC](https://forum.babylonjs.com/t/thin-instances-glb-models/55795/4 "2025-01-07T09:26:39Z")

</div>

`loadedModels.meshes[0]` is the root of the hierarchy and is not a mesh with geometry. The real meshes are children of this node:

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

---

<div class="post-metadata">

**Author:** ![Nicolas\_Bulgarides](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/nicolas_bulgarides/32/43640_2.png) [@Nicolas\_Bulgarides](https://forum.babylonjs.com/u/Nicolas_Bulgarides)\
**Post date:** [January 7, 2025, 10:20pm UTC](https://forum.babylonjs.com/t/thin-instances-glb-models/55795/5 "2025-01-07T22:20:45Z")

</div>

Thank you so much! So helpful!
