Depth Occlusion with AR Foundation 4.1.0 support?

Dear MARS team,

Will there soon be support for the latest AR Foundation 4.1.0 Preview package?
I have an iPad Pro 2020 with Lidar scanner and would love to add occlusion to my MARS project.

kh84uw
Or do you have any instructions to get it working with the current version?

https://blogs.unity3d.com/2020/06/24/ar-foundation-support-for-arkit-4-depth/

Thanks in advance!

Kind regards,
Jurjen

Hello!

MARS will work with AR Foundation 4.1 and it is quite simple to get occlusion working - just add the “AR Camera Manager” and “AR Occlusion Manager” to the camera (under MARS Session) and configure it as you wish.

Let us know if you hit any problems!

1 Like

Hi, I’ve hit a really annoying problem. I’ve created a very simple test scene for iOS - a cube. Added AR Foundation and AR Kit 3.1.3 and it works as expected. Load the app and I get a floating cube.

However, if I change to 4.0.2 in order to get the Occlusion Manager, when the app loads I get the infamous black screen with a square (one face of my cube). Roll back to 3.1.3 and it works again.

This is ultra frustrating as I really need Occlusion Manager; there doesn’t seem to be any fix on forums or videos, just random people saying “send me your logs” and never any solution.

Please can anyone help? (btw, I’m not a programmer).

Thanks in advance
Jon

Hello @AV8-Tech ,

The infamous black screen can happen due to several factors. Couple of things to check:
Are you using 4.0.2 across all your packages?. Check the ARFoundation compatibility section (https://docs.unity3d.com/Packages/com.unity.mars-ar-foundation-providers@1.0/manual/index.html) you need to have the same version for ARFoundation, Core and Kit.

Assuming that you have 4.0.2 on all packages; there are a couple of extra things to look at in our FAQ (https://docs.unity3d.com/Packages/com.unity.mars@1.0/manual/FAQ.html)

I built my Scene to a device and all I see is a black screen. What went wrong?
This could happen for a number of reasons. First, double-check the following:

  • You have the ARCore XR Plugin (Android) or ARKit XR Plugin (iOS) installed via Package Manager.
  • The FunctionalityInjectionModule in Assets/ModuleLoader/Settings/Resources has a Default Island set, and this defines Default Providers including ARFoundationPlaneProvider, etc. from the AR Foundation Providers package.
  • If you’re using SRP/URP/HDRP (Scriptable Render Pipeline, Universal Render Pipeline, High Definition Render Pipeline), ensure that the AR Background Renderer Feature is added to your SRP configuration (generally onto the ForwardRenderer asset for URP projects).

Finally if everything else fails unfortunately we would need a log (which should be easy to get if you are already building to your phone.

  • Check the device log using adb logcat or running the app through XCode. Unity logs errors on-screen if you create a development build, but you might miss some warnings.

is it also for the body tracking too?