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 AR Camera Configuration performances

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

  1. bandyer


    Feb 9, 2021

    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.         {
    8.            cameraManager.currentConfiguration = configs[chosenConfigID];
    10.         }
    11.         catch (Exception e)
    12.         {
    13.             Console.WriteLine(e);
    14.             throw;
    15.         }
    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


    Unity Technologies

    Aug 1, 2018
    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.