# Get a plane from an imported mesh and apply mirror texture to it

**URL:** <https://forum.babylonjs.com/t/get-a-plane-from-an-imported-mesh-and-apply-mirror-texture-to-it/14010>\
**Category:** Questions\
**Created:** [September 8, 2020, 2:32pm UTC](https://forum.babylonjs.com/t/get-a-plane-from-an-imported-mesh-and-apply-mirror-texture-to-it/14010 "2020-09-08T14:32:11Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dag\_Staunton](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/dag_staunton/32/5213_2.png) [@Dag\_Staunton](https://forum.babylonjs.com/u/Dag_Staunton)\
**Post date:** [September 8, 2020, 2:32pm UTC](https://forum.babylonjs.com/t/get-a-plane-from-an-imported-mesh-and-apply-mirror-texture-to-it/14010/1 "2020-09-08T14:32:11Z")

</div>

Hello firends,

I am trying to add a mirror to my scene.

If I take the example:  
[https://www.babylonjs-playground.com/#1YAIO7#5](https://www.babylonjs-playground.com/#1YAIO7#5)

I change:  
var glass = BABYLON.MeshBuilder.CreatePlane(“glass”, {width: 5, height: 5}, scene);  
to:  
//var glass = scene.meshs.getElementById(“mirror”);  
var glass = scene.getMeshByName(“mirror”);

but this does not work as it seems my mesh is not found. I am loading a mesh with plane called mirror earlyer

how can I define the mirror plane in my blender model and then apply the mirror texture in Babylon?

---

<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:** [September 8, 2020, 3:45pm UTC](https://forum.babylonjs.com/t/get-a-plane-from-an-imported-mesh-and-apply-mirror-texture-to-it/14010/2 "2020-09-08T15:45:19Z")

</div>

Hello and welcome!

Can you share the repro with your mesh?

Here is a doc to load external assets: [Using External Assets - Babylon.js Documentation](https://doc.babylonjs.com/resources/external_pg_assets)

---

<div class="post-metadata">

**Author:** ![Dag\_Staunton](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/dag_staunton/32/5213_2.png) [@Dag\_Staunton](https://forum.babylonjs.com/u/Dag_Staunton)\
**Post date:** [September 8, 2020, 7:38pm UTC](https://forum.babylonjs.com/t/get-a-plane-from-an-imported-mesh-and-apply-mirror-texture-to-it/14010/3 "2020-09-08T19:38:13Z")

</div>

Thanks!

Here is an example  
[https://www.babylonjs-playground.com/#RD8DAA#19](https://www.babylonjs-playground.com/#RD8DAA#19)  
I have been trying to address the mirror plane from the model at lines 70-72

---

<div class="post-metadata">

**Author:** ![Dag\_Staunton](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/dag_staunton/32/5213_2.png) [@Dag\_Staunton](https://forum.babylonjs.com/u/Dag_Staunton)\
**Post date:** [September 9, 2020, 8:49am UTC](https://forum.babylonjs.com/t/get-a-plane-from-an-imported-mesh-and-apply-mirror-texture-to-it/14010/4 "2020-09-09T08:49:06Z")

</div>

A better example. I still fail to add the mirror texture to my imported mesh  
[https://www.babylonjs-playground.com/#RD8DAA#28](https://www.babylonjs-playground.com/#RD8DAA#28)

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [September 9, 2020, 12:01pm UTC](https://forum.babylonjs.com/t/get-a-plane-from-an-imported-mesh-and-apply-mirror-texture-to-it/14010/5 "2020-09-09T12:01:39Z")

</div>

I am not sure to understand which mesh should be the mirror and which should not ☹ Could you make the example with only 2 meshes to prevent any confusion during troubleshoot ?

---

<div class="post-metadata">

**Author:** ![Dag\_Staunton](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/dag_staunton/32/5213_2.png) [@Dag\_Staunton](https://forum.babylonjs.com/u/Dag_Staunton)\
**Post date:** [September 9, 2020, 12:13pm UTC](https://forum.babylonjs.com/t/get-a-plane-from-an-imported-mesh-and-apply-mirror-texture-to-it/14010/6 "2020-09-09T12:13:41Z")

</div>

Hi Sebavan,

Thanks in this example there is only plane called mirror its in the middle of the two picture walls.  
[https://www.babylonjs-playground.com/#RD8DAA#29](https://www.babylonjs-playground.com/#RD8DAA#29)

The two side wall are still there so there is something to reflect in the mirror.

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [September 9, 2020, 12:28pm UTC](https://forum.babylonjs.com/t/get-a-plane-from-an-imported-mesh-and-apply-mirror-texture-to-it/14010/7 "2020-09-09T12:28:42Z")

</div>

Your playground was having couple typos with name comparison, meshs instead of meshes and scene being undefined in the creation function:

[https://www.babylonjs-playground.com/#RD8DAA#30](https://www.babylonjs-playground.com/#RD8DAA#30)

---

<div class="post-metadata">

**Author:** ![Dag\_Staunton](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/dag_staunton/32/5213_2.png) [@Dag\_Staunton](https://forum.babylonjs.com/u/Dag_Staunton)\
**Post date:** [September 9, 2020, 3:02pm UTC](https://forum.babylonjs.com/t/get-a-plane-from-an-imported-mesh-and-apply-mirror-texture-to-it/14010/8 "2020-09-09T15:02:47Z")

</div>

oh…

Thank you so much Sebavan
