Log in or register to post comments

Camera lags on Android

January 31, 2017 - 2:19am #1

Vuforia SDK Version: 6.2.6 -

Unity 5.5.0p4



Description with steps to reproduce: 

Create new Project with Vuforia Only

Create new Scene containing only Default ARCamera Prefab and Unity InputField

Every time you click on the input field and the keyboard pops up, vuforia camera will lag more and more until its unusable.

Profiler won't show any performance issues.

This is the same like in the following Post, but there is no awnser and i would like to have a solution. https://developer.vuforia.com/forum/unity-extension-technical-discussion/huge-performance-issue-camera-lags-hell -

Development OS (Mac OS X, Windows, Linux): Windows -

Mobile OS and Version: Android 6.0.1 -

Mobile Device Manufacturer and Model name: Samsung Galaxy S6 Edge -

Do the Vuforia Sample Applications show the same behavior?: not tested

Camera lags on Android

June 25, 2018 - 3:45am #37

Vuforia camera lags when we try to get Vuforia's Camera frame using CameraDevice.Instance.GetCameraImage. We have followed your tutorial to capture the image when trackable updated, We have followed this link for Vuforia Image Access https://library.vuforia.com/articles/Solution/Working-with-the-Camera but camera is still lagging.

Camera lags on Android

May 21, 2018 - 4:24pm #36

I have tested this on Unity 2017.3.1p4 using a Galaxy S6 with Android 5 and was unable to reproduce the issue. I believe henriqueranj is correct that Unity has fixed this for all Android versions starting with this version of Unity.

Thanks,

Vuforia Support

Camera lags on Android

May 4, 2018 - 7:31am #35

Ok, I can confirm that this bug has been fixed for all Android versions with Unity 2017.3.1p4.

By looking at the changelog for this patch, I can only relate the following to this problem (https://unity3d.com/unity/qa/patch-releases/2017.3.1p4):

`XR: Improved background rendering performance in ARCore by eliminating an unnecessary OpenGL state reset.`

Can we have an official clarification from the Vuforia support team on this fix?

Camera lags on Android

May 4, 2018 - 5:53am #34

@wiz @BEFaughnan , can you confirm if this is fixed explicitly for devices with Android 6 or older?

Camera lags on Android

April 4, 2018 - 10:08pm #33

I tryed whether it has been bug was fixed on  on Unity2017.3.1p4.

I think bug was fixed.

Camera lags on Android

March 21, 2018 - 12:35pm #32

Just tried using Unity Beta 2018.1.ob11 out of desparation. It appears to have actually been fixed, so far no other functionality of my application has been lost either. It is a beta though, so try at your own risk.



Using 5 different input boxes I see no obvious difference in camera display frame rate.

Camera lags on Android

March 14, 2018 - 11:49am #31

It's crazy that this is still an issue, started on an app months ago and figure'd this issue would get fixed. Now a week away from publishing and this bug still makes android use all but unbearable.

Camera lags on Android

February 19, 2018 - 4:34pm #30

Hello henriqueranj,

The fix for this comes from Unity and at the current time we have not heard anything related to further updates to this bug.

Thanks,

Vuforia Support

Camera lags on Android

January 30, 2018 - 4:28am #29

Hello Strasza, is there any updates on this fix? Is it something to be fixed by the Unity team?

 

Best regards

Camera lags on Android

January 5, 2018 - 9:35am #28

Thanks for your detailed information henriqueranj. The device I tested on that didn't reproduce the issue was using Android 7.0. I tested today with devices using Android 4.2 and 6.0. I was able to reproduce this issue on both devices using Unity 2017.3 and Vuforia 7. I've passed this information on to the team tracking the issue and will provide any updates on it to this thread.

Thanks,

Vuforia Support

Camera lags on Android

January 5, 2018 - 7:31am #27

Hello Strasza, I just tried an empty project with Vuforia 7 and Unity 2017.30f3 to replicate the issue and in sum:

  • The issue still exists in Android 6 or older.
  • The issue is fixed in Android 7.

I setup the test environment with the following steps:

  • Create new empty Unity project.
  • Turn on Vuforia on XR in the Player Settings.
  • Import Vuforia by adding an AR Camera to an empty Scene.
  • Add the sample Image Target that comes with the Vuforia library.
  • Add a Cube to the Image Target.
  • Add a Canvas with an Input Field.
  • Build an APK and install into the device.
  • Open the app.
  • Open and close keyboard by selecting the Input Field (or slide open and slide back the status bar).

There was no camera lag in the devices:

  • Samsung Galaxy S6 with Android 7
  • Samsung Galaxy S8 with Android 7

There was lag triggered in the devices:

  • HTC One (2013) with Android 5
  • Samsung S4 with Android 5
  • Samsung Galaxy Note 10.1 with Android 5.1
  • Samsung Galaxy S5 Neo with Android 6.0

Could you then please look further into this?

Camera lags on Android

January 4, 2018 - 3:16pm #26

I just tested this using the core samples for Unity 2017.3.0f3 with Vuforia 7.0 and an input field as it was previously reproduced with Unity 5.6 and Vuforia 6.2.10. I was not able to reproduce this in the latest builds. If someone is able to reproduce this, could you please provide the steps you've taken as well as the versions of Unity and Vuforia used?

Thanks,

Vuforia Support

Camera lags on Android

December 14, 2017 - 9:24am #25

I also assumed that this was a fix for this issue (which has at this point been around for around a year) but like you, I found that a new basic project still produces this problem.

Not being able to use input fields is actually quite restricting for some of the projects I have already done and plan to do in the coming year.

Could the Vuforia Team please try to shed light on what is going on regarding this bug?

The patch notes in the unity version mentioned by henriqueranj imply that this has been fixed, and the bug report has also now been closed, so now my concern is that this bug is not even actively being looked at due to Unity/Vuforia teams thinking that it is no longer an issue.

Thanks.

Camera lags on Android

December 14, 2017 - 1:44am #24

According to the Unity support this bug should have been fixed in Patch 2017.1.2p3 (https://unity3d.com/unity/qa/patch-releases/2017.1.2p3)

Quote:

(934841) - Android: Fixed android video player playback starting to lag after activating input field.

However, after trying an empty project with Vuforia SDK v6.2.10 the same issue still happened in Android. After opening the input field after a few times, the camera video feed shows severe framerate lag. Bringing the app into the background "solves" it.

Could the Vuforia team help us out to confirm if this was actually fixed as stated by Unity?

Camera lags on Android

October 31, 2017 - 2:23am #23

@OmarShoaib This solutions does help, however any another Android Native overlay (push notifications, status bar pull, etc) will still trigger this issue.

Regarding the Unity reported bug being closed now, I've been pushing the Unity team to give more information and all I got was a promise that it would be backported to Unity 5.6 after the release of Unity 2017.2. However, that time has long passed and I've got no more information back from them.

It is a bit unsettling that such a breaking issue can linger for more than 1 year and no proper solution from either Vuforia or Unity has been delivered.

Camera lags on Android

October 30, 2017 - 2:26am #22

Hello All,

Could the Vuforia Team please update us on this issue's current status. The linked Unity bug report is now set to "Closed" but does not state in which version (if any) the problem has been fixed.

Thanks

Camera lags on Android

October 19, 2017 - 5:00am #21

After days of r&d I have found a workaround for arcamera lags when keyboard on input field is visible.

Use the below asset, its easy to use and quite a better workaround until unity completely fix this issue.

https://github.com/YousicianGit/UnityNativeEdit

Please let me know if anyone finds anything about arcamera lags on Notification panel's visibility.

Thanks.

Camera lags on Android

September 27, 2017 - 9:18am #20

We are having this issue now too with Vuforia Version 6-2-10 and Unity Version 5.6.1f1



Even after loading a new level the problem still persists. If only unity had some way of explicitly pausing and resuming the game instead of all those hacky work arounds.

Camera lags on Android

August 23, 2017 - 9:08am #19

Hello henriqueranj,

Unfortunately we have not heard back from Unity on this issue yet. I'll update here as soon as I hear anything.

Sorry for the inconvenience,

-Vuforia Support

Camera lags on Android

August 23, 2017 - 1:19am #18

Hello Strasza,

Is there any update from Unity regarding this fix? This fix is crucial for our project.

Camera lags on Android

July 26, 2017 - 9:08am #17

Hello all,

I just wanted to provide a quick update on this issue. We did more internal investigation and found that this is an issue with Unity. We submitted a bug with them and they have sent it for resolution with their developers. You can track the issue submitted with them here: https://fogbugz.unity3d.com/default.asp?934841_l6klsmjd5av7g5th

I will post here when we hear back from them with the version of Unity this is fixed in.

Thank you all for your patience,

-Vuforia Support

Camera lags on Android

July 19, 2017 - 2:11am #16

Hello,

I am also facing this issue using Unity 5.6.0f3 and Vuforia 6.2.10.

So far I've seen a lot of people report this issue and both Unity and Vuforia haven't contacted or replied about it. Also, no developer has posted any sort of workaround, fix or solution, which seems strange due to how old some of these reports are. 

Did anyone find some sort of workaround for this?

Camera lags on Android

July 7, 2017 - 9:22am #15

Hi,

Has there been any progress made towards a fix for this bug?

Could a rough timescale for when updates for this will be released?

Camera lags on Android

June 24, 2017 - 11:24am #14

Thankyou, the support is much appreciated. Hopefully we can get to the bottom of this issue.

Camera lags on Android

June 23, 2017 - 4:43pm #13

I've been able to reproduce the issue you are having. We are currently investigating it further and I will post here with any relevant updates.

Thanks.

Camera lags on Android

June 21, 2017 - 11:34am #12

We'll look into this and will post back here with any information.

Thanks.

Camera lags on Android

June 21, 2017 - 3:01am #11

Thank you for the timely response medabit.

I have created a new Unity project and added a camera and 3D Plane object to the scene on which I added a script to render a device's camera onto. I then added a UI Layer and Input Field to the scene.

When I built this project to my android device (Samsung S6, Android Version 7.0) I made an attempt to recreate the problem by selecting and deselecting the input field several times. I could not get the camera to lag.

 

I then created the same setup into a scene in my Vuforia project but added a button which links to the scene which uses an ARCamera object instead.

I built to the same device and repeated what I did before, selected and deselected the input field but could not recreate the camera lag issue in this scene.

However when I then changed scene with the button I added to do so, the ARCamera was already suffering from the camera lag issue.

Im not sure if this has been brought up before, but this issue affects the ARCamera across scenes (at least from what I have observed) so selecting and deselecting input fields or using Native popups on a different scene to where the ARCamera is will also cause the ARCamera to have performance issues, hence why this is such a crippling issue for my app as it allows users to open webpages in a different scene.

My test makes it seem as if one of the behaviour scripts on the ARCamera is somehow causing this problem to occur?

Let me know if you reach the same conclusion if you try to recreate this problem.

If there is anything else I can do to help with this I will try my best to do so.

Camera lags on Android

June 20, 2017 - 1:05pm #10

Hello,

The original issue filed with Unity was described as a Unity problem - no mention of Vuforia in the original description. But, as we cannot access the project mentioned in the bug report there is no way for me to confirm this:

https://issuetracker.unity3d.com/issues/android-inputtext-makes-webcam-update-texture-slow

The second issue filed with Unity has mixed feedback in the comments on whether Vuforia is present/not present when the issue is observed:

https://issuetracker.unity3d.com/issues/android-camera-lags-when-using-vuforia-plugin-and-input-field

Can someone attempt to recreate the issue without the Vuforia Unity Extension installed? If this is the case it is a Unity bug for them to fix.

Thanks.

 


Camera lags on Android

June 20, 2017 - 1:38am #9

I am experiencing the same problem with my app.

Unity Version: 5.6.1 p4

Vuforia SDK Version: 6-2-10

Selecting and deselecting an input field and repeating this process causes the ARCamera to become slower and slower until it is completely unusable.

If the app is backgrounded, the ARCamera seems to reset itself and returns to working order.

The use of native popups such as those used with NativeToolKit also seems to cause this issue, as stated by someone else in another post.

Do we actually know who needs to fix this? Because there are a few Issue reports of this bug on Unity's Issue Tracker and there are also users who believe this may be something the Vuforia team need to fix.

Could we possibly please get a response from Vuforia to clarify:

- If they are aware of this issue and...

- Which team Vuforia/Unity needs to fix this problem.

This issue is now severely delaying the release of my app since it affects the user experience so much, which seems to be the case for quite a few others, so any information about this would be greatly appreciated.

Thanks.

Camera lags on Android

May 22, 2017 - 2:28am #8

Hi,

Still no solution to this problem ? I tried in Unity 5.6 with Vuforia 6.2 and it's still not working. Is there any workaround ?

I am currently working on Unity 5.5.

 

Thanks

Camera lags on Android

April 4, 2017 - 1:47am #7

Hi, 

i tested it in 5.6 and it is still not fixed. I submitted another bugreport to unity and they reopened the issue. You can track the status under the follwing link. Vote for this problem in Unity IssueTracker if you have it too, so that they realise that they should fix this fast.

https://issuetracker.unity3d.com/issues/android-camera-lags-when-using-vuforia-plugin-and-input-field

 

Camera lags on Android

March 8, 2017 - 2:48pm #6

Hello,

Unity has marked this issue as fixed in Unity 5.6.0: https://issuetracker.unity3d.com/issues/android-inputtext-makes-webcam-update-texture-slow

Has anyone confirmed?

Thanks.

Camera lags on Android

March 8, 2017 - 8:53am #5

Same issues here. Any solution?

Camera lags on Android

March 7, 2017 - 8:37am #4

Same problem on Unity 5.5.2p1 and last Vuforia version... Any workaround or fix? .... 

Camera lags on Android

February 6, 2017 - 7:13pm #3

I can also recreate the issue by simply showing and hiding the notification panel a couple of times, while the camera is visible.

This is replicable in the sample Unity projects.

Another similar issue - https://developer.vuforia.com/forum/android/camera-playback-lags-when-calling-android-native-dialogs

Camera lags on Android

February 6, 2017 - 6:48pm #2

We have just started experiencing the exact same issue.

Added a Unity input field to the scene, and every time I select the field (which reveals the keyboard), the camera lag increases.

Testing on Samsung Galaxy Tab S2.

Unity 5.5.1f1

Vuforia 6.1.17

 

Also found this - https://issuetracker.unity3d.com/issues/android-inputtext-makes-webcam-update-texture-slow

Not sure if this is a Unity bug or Vuforia issue.

 

 

Log in or register to post comments