Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question ARKit Environment Depth - iOS Quicklook vs Unity

Discussion in 'AR' started by Volkerku, Jun 29, 2021.

  1. Volkerku

    Volkerku

    Joined:
    Nov 23, 2016
    Posts:
    108
    Can someone explain why death estimation with iOS Quicklook looks so much better then in Unity?
    It seems the depth map is somehow processed (blurred maybe). In Unity it has sharp corners which look awful. I tried all levels of Unity depth estimation.
    Comparison images below:

    IMG_2774.jpg IMG_2779.jpg
     
  2. JoeGrainger

    JoeGrainger

    Joined:
    Oct 20, 2012
    Posts:
    19
  3. Volkerku

    Volkerku

    Joined:
    Nov 23, 2016
    Posts:
    108
    Thanks you very much, I think that must be it.
    Tried to add a preference in my app to activate the temporalSmoothing, but not sure how to go about it.
    With the depthMode setting, this is relative simple with AROcclusionManager,:
    Code (CSharp):
    1. AROcclusionManager.requestedEnvironmentDepthMode = EnvironmentDepthMode.Disabled;
    TemporalSmoothing seems to be part of ARSubsytem, but I don't know how I reference a subsystem to set and get values. This does not work:
    Code (CSharp):
    1. if (environmentDepthTemporalSmoothingSupported()) {
    2.      environmentDepthTemporalSmoothingEnabled = true;
    3. }
     
  4. Volkerku

    Volkerku

    Joined:
    Nov 23, 2016
    Posts:
    108
    figured it out. At least I think so, no errors but I have not jet build and deployed the project.
    All that's needed is
    Code (CSharp):
    1. _AROcclusionManager.environmentDepthTemporalSmoothingRequested = true
     
  5. Volkerku

    Volkerku

    Joined:
    Nov 23, 2016
    Posts:
    108
  6. TreyK-47

    TreyK-47

    Unity Technologies

    Joined:
    Oct 22, 2019
    Posts:
    1,796
    Note from the team:

    The AR Foundation team has an item on the backlog to improve certain visual rendering functionalities.

    Unity users can write their own custom shaders for their content to achieve similar effects.