Search Unity

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:
    113
    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:
    113
    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:
    113
    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:
    113
  6. TreyK-47

    TreyK-47

    Unity Technologies

    Joined:
    Oct 22, 2019
    Posts:
    1,820
    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.