Is there a way to configure depth occlusion for android AR?

I want to know if its possible to turn this ON/OFF depending on the project
Android Only, since quicklook has it ON by default

To configure depth occlusion for Android AR using Needle Engine, you would typically utilize the settings related to WebXR features, which can enable or disable specific functionalities such as depth sensing based on your project requirements.

For Android AR, you may manually configure the enabling or disabling of depth-sensing features. Needle Engine provides an option for depth sensing in WebXR, though it is primarily aimed at devices like Oculus Quest as per the current settings.

Steps to Enable/Disable Depth Occlusion:

  1. Check WebXR Settings: Make sure your project is configured with WebXR settings. This configuration includes options for AR features, including depth sensing.

  2. Configure Depth Sensing in WebXR:

    • You can set useDepthSensing to true or false in your WebXR component to enable or disable depth occlusion:
      import { WebXR } from "@needle-tools/engine";
      
      const webxrComponent = new WebXR();
      webxrComponent.useDepthSensing = true; // Set to false to disable depth sensing
      
  3. Conditional Configuration: If you need this feature to be toggled based on specific conditions, you can incorporate logic that checks the environment or user settings to set useDepthSensing accordingly.

For more detailed exploration, you can refer to the Needle Engine documentation and the ARCore depth API on the Google Developers site here.

Summary

To toggle depth occlusion for Android projects, use the useDepthSensing property in the WebXR component. Adjust it based on your project requirements to control this feature programmatically.

If you need further customizations or integrations, I recommend examining the exact context and environment setup in your project, as it might differ based on the specific use cases or device capabilities (see the documentation). If you encounter specific challenges, feel free to ask for detailed guidance tailored to those scenarios!

24 replies left
thread_FT0JaBNBHAwYhpsg1wMUKUqX
Reply to this message to continue the conversation

Ok, so if I manually configure this file, everytime I export/save the project, Do I have to configure it again ?

Hi Manuel,

If you manually configure settings such as depth occlusion in the specific file or component, you may need to reconfigure it after each export or save, depending on how your project’s build and export process is set up.

Recommendations:

  1. Scriptable Configuration: Instead of hardcoding values, you can create a configuration script that sets these values every time the project is loaded. This way, even if the exported files are reset, your configuration will apply automatically.

  2. Project Settings: If Needle Engine has project settings or a central configuration file where you can set project-wide parameters, utilize that for consistency across exports.

  3. Documentation Review: Check the documentation specifically to see if there are file templates or recommended practices that maintain configurations through export processes.

By establishing a programmatic way to set configurations, you mitigate the manual effort required after each project save or export. If you need help writing such a script, please share more details about your configuration setup!

23 replies left
thread_FT0JaBNBHAwYhpsg1wMUKUqX
Reply to this message to continue the conversation

Hello, which file are you refering to?

You can simply enable depthSensing in the WebXR component via script or in Unity/Blender by enabling the toggle in the UI.

ahh ok great, thanks