# Mesh Instancing with nested hierarchy

**URL:** <https://discourse.threejs.org/t/mesh-instancing-with-nested-hierarchy/26055>\
**Category:** Questions\
**Tags:** instanced-mesh\
**Created:** [May 7, 2021, 12:46pm UTC](https://discourse.threejs.org/t/mesh-instancing-with-nested-hierarchy/26055 "2021-05-07T12:46:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aakash\_B](https://avatars.discourse-cdn.com/v4/letter/a/f04885/32.png) [@Aakash\_B](https://discourse.threejs.org/u/Aakash_B)\
**Post date:** [May 7, 2021, 12:46pm UTC](https://discourse.threejs.org/t/mesh-instancing-with-nested-hierarchy/26055/1 "2021-05-07T12:46:09Z")

</div>

Hey Guys,

I’m importing a model with nested hierarchy which has multiple assemblies and parts in it.  
Also there are few parts and assemblies which are reused throughout the model. So for the same parts I want to use the instancing functionality to reduce the draw calls. Following is the hierarchy of the model,

-Scene

- cubePart(Object3D)  
- cubeMesh (Mesh)
- cubePart(Object3D)  
- cubeMesh (Mesh)

So during adding the first “cubePart” I have created a instanced mesh using the cubeMesh geometry and material and maintained that instanced mesh it in a “list”.

For loading the second “cubePart” I have just cloned the first “cubePart” and removed normal mesh from it and added the instanced mesh by accessing it from the list.

So the problem here is I’m unable to see the instanced meshes in scene as it is not visible although I can see its existence in scene by using console.

Could you please help me with how can I resolve this issue? Any example for reference would be really helpful.

---

<div class="post-metadata">

**Author:** ![prisoner849](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/prisoner849/32/535_2.png) [@prisoner849](https://discourse.threejs.org/u/prisoner849)\
**Post date:** [May 7, 2021, 12:59pm UTC](https://discourse.threejs.org/t/mesh-instancing-with-nested-hierarchy/26055/2 "2021-05-07T12:59:31Z")

</div>

I used `.worldMatrix` property in this example for hierarchical structure of fingers:  
https://codepen.io/prisoner849/embed/preview/qBaNKNM?default-tabs=js%2Cresult&height=300&host=https%3A%2F%2Fcodepen.io&slug-hash=qBaNKNM

 ![изображение](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/1/5/1547f2895a4b07d63593c437f6c5c38f5afdb7d2.png)

Phalanxes are single `InstancedMesh` of a custom capsule geometry.

---

<div class="post-metadata">

**Author:** ![Aakash\_B](https://avatars.discourse-cdn.com/v4/letter/a/f04885/32.png) [@Aakash\_B](https://discourse.threejs.org/u/Aakash_B)\
**Post date:** [May 14, 2021, 9:44am UTC](https://discourse.threejs.org/t/mesh-instancing-with-nested-hierarchy/26055/3 "2021-05-14T09:44:51Z")

</div>

Hi,

Thanks for the reply. I’m able to load the hierarchy with instanced meshes.
