# Occlusion with invisible mesh

**URL:** <https://forum.babylonjs.com/t/occlusion-with-invisible-mesh/4075>\
**Category:** Questions\
**Created:** [June 24, 2019, 6:31am UTC](https://forum.babylonjs.com/t/occlusion-with-invisible-mesh/4075 "2019-06-24T06:31:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jez](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/jez/32/2219_2.png) [@Jez](https://forum.babylonjs.com/u/Jez)\
**Post date:** [June 24, 2019, 6:31am UTC](https://forum.babylonjs.com/t/occlusion-with-invisible-mesh/4075/1 "2019-06-24T06:31:43Z")

</div>

Hello Babylonians!

I’m trying to use occlusion to hide a part of a mesh which is behind an other invisible mesh.

But I want to hide only one mesh not every meshes.

For example in this tiny PG: [Babylon.js Playground](https://playground.babylonjs.com/#ZR1LP8)  
I just want to hide (make it invisible) only the tiny part of the sphere behind the cube. But not the ground.

In the future I want to totally set the visibility of the cube at 0 and still put the tiny part of the sphere, behind the invisible cube , invisible too.

---

<div class="post-metadata">

**Author:** ![Dad72](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/dad72/32/13_2.png) [@Dad72](https://forum.babylonjs.com/u/Dad72)\
**Post date:** [June 24, 2019, 10:09am UTC](https://forum.babylonjs.com/t/occlusion-with-invisible-mesh/4075/2 "2019-06-24T10:09:00Z")

</div>

You can not hide part of a mesh with occlusions. You can only hide an entire mesh.

This may be possible by removing faces from a mesh (by designing them into a variable to display them again). But I fear that it will be very difficult to put in place. The difficulty of knowing which part of the mesh is behind another, to remove only the good faces hidden.

Occlusions mask the entire mesh and it is based on what the camera sees, not according to a piece of mesh hiding by another.

---

<div class="post-metadata">

**Author:** ![Jez](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/jez/32/2219_2.png) [@Jez](https://forum.babylonjs.com/u/Jez)\
**Post date:** [June 25, 2019, 1:27am UTC](https://forum.babylonjs.com/t/occlusion-with-invisible-mesh/4075/3 "2019-06-25T01:27:00Z")

</div>

Oh I see @Dad72  
Thank you for your help!
