Skip to main content
pon7
Inspiring
September 25, 2025
Question

How to occlude objects at a far distance?

I have a big virtual environment with some pillars.  Currently, the AR objects are being rendered over the pillars.  I would like a way to occlude the objects where the physical pillars are so that the virtual objects appear to be behind the pillars.

In the HoloLens and Magic Leap, I would simply include the virtual pillars and put a matte black material on them.  The headset would render the black objects (the virtual pillars) as passthrough, and occlude any virtual object behind them, thereby making the virtual objects appear to be behind the physical pillars.

How do I do something similar with the Quest 3?  When I research this topic, the solution seems to be use Depth API, but my virtual environment is much too large for that solution.  How do I get a virtual object to appear behind a physical object that is far away? 

Thanks.

6 replies

Meta Employee
September 25, 2025

Hello there!

If you go to the Mixed Reality Utility Kit, you may use the Space Setup feature which allows users to generate a Scene Model. This gives you the ability to have a good amount of control over your scene, such as the occlusion of objects. 

If you go here, it will take you to our passthrough windows tutorial. You may be able to use these windows to cut out the pillars to sit in front of your AR objects. This is more so if the majority of your environment will be virtual.

If neither of these helped, let me know so we may find an alternate solution!

pon7
pon7Author
Inspiring
September 25, 2025

I kept digging and found the PokeAHoleMaterial.  I definitely think this is the way to go as it seems exactly like how the HoloLens and Magic Leap do it.  But when I apply the PokeAHoleMaterial onto my objects, they just render black.  I'm going to circle back to this in a couple days and try again but if you have any points as to why PokeAHole is rendering black, I'd appreciate it.  Thanks.

Meta Employee
September 26, 2025

Here is our document on troubleshooting passthrough, switching to Vulkan preview mode may resolve this issue. If this does fix the mesh rendering black, let me know!