Search Unity

[Fixed] Incremental camera lag when using Model Target

Discussion in 'Vuforia' started by henriqueranj, Aug 14, 2018.

  1. henriqueranj

    henriqueranj

    Joined:
    Feb 18, 2016
    Posts:
    177
    Hello, I seem to have found a strange behaviour with the Vuforia camera feed when tracking Model Targets. In Android and iOS devices (not replicable in the Editor), every time I re-scan the model there is a noticeable accumulative decrease of FPS in the camera feed. Sending the app to the background seems to bring the framerate back to normal.

    When profiling the app, there is no actual frame processing impact and the lag is only visible in the camera feed and not in the overall app rendering (stays fluid).

    Is anyone else also experiencing this? Can the Vuforia support team please take a look into this?

    I am using Unity 2018.1.7f1 and Vuforia 7.2.24
     
  2. meedabit

    meedabit

    Official Vuforia Employee Vuforia

    Joined:
    Dec 8, 2016
    Posts:
    266
    Hello,

    The Model Targets feature requires significant processing power. We've observed frame rate drops on a variety of devices, to varying degrees.

    My understanding is that Unity controls the frame rending rate based upon some real time device performance KPIs. Thus, it can throttle the rate outside of the Vuforia plugin's control.

    Can you give examples of devices exhibiting this behavior?

    Thanks,
    Vuforia Engine Support
     
  3. henriqueranj

    henriqueranj

    Joined:
    Feb 18, 2016
    Posts:
    177
    Hi @meedabit ,

    This is noticed in all our test devices: iPhone 6S, iPhone X, iPad Air, Samsung S8 and Samsung S6.

    We did a set of experiments with these devices:
    A. Device is turned on for 3 minutes without tracking anything - no incremental lag is noticed.
    B. Device is turned on for 3 minutes while tracking the model (no interruptions) - no incremental lag is noticed.
    C. Device tracks the model, then loses and re-tracks for several times - incremental lag is noticed.

    Further, we did better testing on bringing the app to the background and it has been noticed that - contrary to what I stated in the thread - it does not improve the camera FPS.

    Also note that in all of these devices and experiments there is a noticeable heating due to the tracking processing, which we already improved upon to heat less and Vuforia 7.2.24 is way more performant due to the improvements in the garbage collection.
     
  4. meedabit

    meedabit

    Official Vuforia Employee Vuforia

    Joined:
    Dec 8, 2016
    Posts:
    266
    Hi @henriqueranj,

    Thanks for the feedback. Scenario "C" provides an interesting observation that I've not heard before - I will forward it along to our QA team.

    The device heating issue is one that Vuforia cannot overcome, and can also attribute to reduced frame rates. As the device heats, internal sensors trip governors that down clock the CPU. We face this issue on every device that we test.

    Thanks,
    Vuforia Engine Support
     
  5. henriqueranj

    henriqueranj

    Joined:
    Feb 18, 2016
    Posts:
    177
    Hi @meedabit , thanks for looking into scenario C. Have you heard anything from your QA team? I am trying to assess if this issue comes from Vuforia + Unity.
     
  6. Vuforia-Strasza

    Vuforia-Strasza

    Official Vuforia Employee Vuforia

    Joined:
    Jun 13, 2017
    Posts:
    548
    Neither myself or our QA team has been able to reproduce this with Unity 2018.2 and Vuforia 7.2 using the core samples or a project with just a Model Target and ARCamera. Were you able to reproduce this in the samples? Were you reproducing this by resetting the tracking and re-detecting, or by turning off the device tracker and losing tracking before re-detecting?
     
  7. henriqueranj

    henriqueranj

    Joined:
    Feb 18, 2016
    Posts:
    177
    Vuforia-Strasza likes this.