# Instances on imported mesh

**URL:** <https://forum.babylonjs.com/t/instances-on-imported-mesh/8546>\
**Category:** Questions\
**Created:** [February 13, 2020, 1:59am UTC](https://forum.babylonjs.com/t/instances-on-imported-mesh/8546 "2020-02-13T01:59:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![darkloner99](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/darkloner99/32/6846_2.png) [@darkloner99](https://forum.babylonjs.com/u/darkloner99)\
**Post date:** [February 13, 2020, 1:59am UTC](https://forum.babylonjs.com/t/instances-on-imported-mesh/8546/1 "2020-02-13T01:59:40Z")

</div>

Hello,  
I’m trying to create instances of a imported mesh in gltf format.  
But before, here the result without making instances : [Capture — ImgBB](https://ibb.co/xYznYNV)

```
for (let i = 0; i < 5000 / 300; i++) {
            loader = BABYLON.SceneLoader.ImportMesh("", 'assets/model/', 'scene1bin.glb', scene, function (mesh) {
                mesh = mesh[0];
                mesh.position = new BABYLON.Vector3(i * 300, -105, 55)
                mesh.scaling = new BABYLON.Vector3(4, 4, 5)

        })

```

So now, I use as a model the code available in the doc: “how\_to\_use\_instances”

```
 loader = BABYLON.SceneLoader.ImportMesh("", 'assets/model/', 'scene1bin.glb', scene, function (mesh) {
        mesh = mesh[0];
        // position changed in order to see it
        mesh.position = new BABYLON.Vector3(300, 0, 0)
        mesh.scaling = new BABYLON.Vector3(4, 4, 5)
        for (let i = 1; i < 5000 / 300; i++) {
            var meshInst = mesh.createInstances("i"+i)
            mesh.position = new BABYLON.Vector3(i * 300, -105, 55)
            mesh.scaling = new BABYLON.Vector3(4, 4, 5)
        }
    })

```

Here the result: [Capture2-PNG — ImgBB](https://ibb.co/bJt62LV)

As you see, my instances are not visible and I don’t understand why.

Thank you for you help 🙂

---

<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:** [February 13, 2020, 6:03pm UTC](https://forum.babylonjs.com/t/instances-on-imported-mesh/8546/2 "2020-02-13T18:03:49Z")

</div>

Welcome to the forums @darkloner99!

`mesh[0]` is a root node that does have any mesh attached. What you probably want is to call [instantiateHierarchy](https://doc.babylonjs.com/api/classes/babylon.transformnode#instantiatehierarchy) or use [SceneLoader.LoadAssetContainer](https://doc.babylonjs.com/api/classes/babylon.sceneloader#loadassetcontainer) and call [instantiateModelsToScene](https://doc.babylonjs.com/api/classes/babylon.assetcontainer#instantiatemodelstoscene).
