# Instanced Mesh on object with multiple children

**URL:** <https://discourse.threejs.org/t/instanced-mesh-on-object-with-multiple-children/29483>\
**Category:** Questions\
**Tags:** geometry\
**Created:** [September 1, 2021, 1:36pm UTC](https://discourse.threejs.org/t/instanced-mesh-on-object-with-multiple-children/29483 "2021-09-01T13:36:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pedro](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/pedro/32/14080_2.png) [@Pedro](https://discourse.threejs.org/u/Pedro)\
**Post date:** [September 1, 2021, 1:36pm UTC](https://discourse.threejs.org/t/instanced-mesh-on-object-with-multiple-children/29483/1 "2021-09-01T13:36:32Z")

</div>

Hi.

I’m making a project that uses a lot of repeated geometries.  
For example, one of them is BoxGeometry.  
Initially, I was creating a mesh for each object.  
However, I saw that I was making a CPU call for each object.  
I found the InstancedMesh reduces the number of draw calls.  
I tried the InstancedMesh on BoxGeometry, and it worked.  
When I was trying more complex objects (with children), that have multiple geometries, it didn’t work.  
Anyone knows what I need to do in the more complex objects.

Thank you.

---

<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:** [September 1, 2021, 1:55pm UTC](https://discourse.threejs.org/t/instanced-mesh-on-object-with-multiple-children/29483/2 "2021-09-01T13:55:21Z")

</div>

Hi!  
For some ideas, have a look at this post: [Mesh Instancing with nested hierarchy - #2 by prisoner849](https://discourse.threejs.org/t/mesh-instancing-with-nested-hierarchy/26055/2)

---

<div class="post-metadata">

**Author:** ![Pedro](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/pedro/32/14080_2.png) [@Pedro](https://discourse.threejs.org/u/Pedro)\
**Post date:** [September 1, 2021, 4:19pm UTC](https://discourse.threejs.org/t/instanced-mesh-on-object-with-multiple-children/29483/3 "2021-09-01T16:19:33Z")

</div>

Hi!

Thank you for your answer.  
I forgot a detail.  
Every geometry has a different material.  
For example, a car has wheels, a body, and other parts.  
Each part has a different material.  
These geometries/materials are part of the same mesh, which I load from an obj file.

The fact that I have different materials changes anything?  
Do I have to create an InstancedMesh for each of the children?

Thank You!

---

<div class="post-metadata">

**Author:** ![Chaser\_Code](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/chaser_code/32/20199_2.png) [@Chaser\_Code](https://discourse.threejs.org/u/Chaser_Code)\
**Post date:** [September 1, 2021, 4:42pm UTC](https://discourse.threejs.org/t/instanced-mesh-on-object-with-multiple-children/29483/4 "2021-09-01T16:42:13Z")

</div>

I think if 10 cars.  
One InstancedMesh for car body with 10 instances.  
One InstancedMesh for car wheels with 10 instances.  
And update matrix every frame.
