Disable occlusion for collaboration debugging?

Hello,

I’m noticing that during a collaborative session anchors created on the host device are appearing in a different location on client devices and it’s making it challenging to test other collaboration logic.

For example, when the client places a textured plane mesh at an anchor placed by the host, this placement can sometimes be considered as behind a surface and it gets clipped by RealityKits mesh occlusion.

I’d prefer if I could see it floating in space when testing so I can see that something is happening.

Im drawing a blank on if there are any debugging options to help me out. Nothing in render or debug options jumped out at me.

Thoughts?

Answered by DTS Engineer in 705608022

Hey J0hn,

Im drawing a blank on if there are any debugging options to help me out. Nothing in render or debug options jumped out at me. Thoughts?

You were very very close ;), the scene understanding options live in a slightly different location from the render and debug options:

arView.environment.sceneUnderstanding.options = [.physics]

Choosing an option set that omits the occlusion option (and also the default option, because default includes occlusion) will effectively disable occlusion. In this way, you can still utilize the scene reconstruction mesh for collisions and lighting, without occluding anything.

You could also turn sceneReconstruction off altogether (if you don't need it) by manually configuring the underlying ARSession, but assuming you are just doing this for debugging purposes, it probably makes more sense to leave it on and just disable occlusion, that way you also get to debug with performance that is more representative of your actual app.

Accepted Answer

Hey J0hn,

Im drawing a blank on if there are any debugging options to help me out. Nothing in render or debug options jumped out at me. Thoughts?

You were very very close ;), the scene understanding options live in a slightly different location from the render and debug options:

arView.environment.sceneUnderstanding.options = [.physics]

Choosing an option set that omits the occlusion option (and also the default option, because default includes occlusion) will effectively disable occlusion. In this way, you can still utilize the scene reconstruction mesh for collisions and lighting, without occluding anything.

You could also turn sceneReconstruction off altogether (if you don't need it) by manually configuring the underlying ARSession, but assuming you are just doing this for debugging purposes, it probably makes more sense to leave it on and just disable occlusion, that way you also get to debug with performance that is more representative of your actual app.

Disable occlusion for collaboration debugging?
 
 
Q