Ground shadow and visibility

Hey,

I'm building an interior design app In Vision OS 2.0. I'm fetching the planes detected by ARKit and I then proceed to add them with an "OcclusionMaterial" to make sure my object are occluded accordingly. However, I'm facing two problems with this:

  1. The ground shadows are completely disabled as soon as an occlusion material is added, even if I inset the planes doing the occlusion. I've looked into this: https://developer.apple.com/documentation/shadergraph/realitykit/shadow-receiving-occlusion-surface-(realitykit) but when I tried to use it, it behaved exactly as "OcclusionMaterial".
  2. The planes are also occluding all windows (mines and the system ones), which is a behavior I'd like to avoid. I only want to occluded the Entity I added. Is there a way to achieve this?

Thanks in advance

Hello @Nalouk, unfortunately I don't have any workarounds for what you are trying to accomplish.

  1. OcclusionMaterial does not receive shadows cast by entities with GroundingShadowComponent. Please file an enhancement request via Feedback Assistant to receive updates on this feature.
  2. OcclusionMaterial will hide all virtual content behind it, including SwiftUI windows and any dialogs from the operating system. Please file an enhancement request via Feedback Assistant to receive updates on this feature.

Hey,

  1. I think I wasn't clear in my explanation. The shadow are hidden even when the occlusion mesh are not between the headset and the ground. Maybe the shadowmap is rendered from another view point that is also taking into account the occlusion mesh? In my example, I was able to make it appear when I added an offset of around 2.5meters downwards on the ground occlusion mesh.
  2. Will do, thanks!
Ground shadow and visibility
 
 
Q