Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question AR Camera Configuration performances

Discussion in 'AR' started by bandyer, Mar 1, 2022.

  1. bandyer

    bandyer

    Joined:
    Feb 9, 2021
    Posts:
    4
    Hi.

    I need to optimize the performance of my AR Foundation app (both app performance and AR plane detection quality). I'm trying different camera configurations to see if there is significant improvement in performance, but that doesn't seem to be the case. Whether i choose 640x480, 1280x720 or 1920x1080, app FPS is always the same and doesn't seem to be a difference in plane detection quality.
    I'm setting the configuration in the regular way :

    Code (CSharp):
    1. if (cameraManager.descriptor.supportsCameraConfigurations)
    2. {
    3.     using (var configs = cameraManager.GetConfigurations(Allocator.Temp))
    4.     {
    5.         try
    6.         {
    7.          
    8.            cameraManager.currentConfiguration = configs[chosenConfigID];
    9.          
    10.         }
    11.         catch (Exception e)
    12.         {
    13.             Console.WriteLine(e);
    14.             throw;
    15.         }
    16.  
    17.     }
    18. }
    Am i doing something wrong or is it how it is supposed to behave ? If the latter, what is the purpose of setting camera configuration ? Also, is there a specific metrics to benchmark plane detection quality ? Because i'm currently counting both the number of planes and number points from ARPointCloudManager, but both numbers doesn't seem to be changing either.
     
  2. todds_unity

    todds_unity

    Joined:
    Aug 1, 2018
    Posts:
    324
    The camera configuration should have little to no impact on tracking quality.

    If your app is below the target FPS, then you will need to look at the profiler to understand what in your app is causing the slowdown.