Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Continuous autofocus not working on iPhone 16 pro max #166

Open
shalesh-shekhar opened this issue Dec 5, 2024 · 12 comments
Open

Continuous autofocus not working on iPhone 16 pro max #166

shalesh-shekhar opened this issue Dec 5, 2024 · 12 comments
Labels
bug-report Bugs and issues

Comments

@shalesh-shekhar
Copy link

Summarize the bug:
The continuous autofocus doesn't work on iPhone 16 Pro Max. We used Vuforia's camera configuration to set continuous autofocus and also implemented it during runtime through scripting, but neither approach resolved the issue.

Observed problem:
On other iPhones, the autofocus is swift and accurate. However, on the iPhone 16 Pro Max, autofocus doesn't work properly or is very unstable and slow. So far, I have set the continuous autofocus through Vuforia's camera configuration settings and also through scripting, but neither approach resolves the issue.

Expected result:
The normal camera configuration should work consistently across all devices. With the script, continuous autofocus should engage successfully after Vuforia is initialized and loaded.

Other observations:
Even when the image appears to be in focus, the app sometimes fails to recognize the target image.

Reproducible steps:

  1. Create a basic Vuforia project with an image target.
  2. Build and deploy the app to an iPhone 16 Pro Max.
  3. Observe autofocus behavior while scanning the target image.

Affected Vuforia Engine version: 10.27
Workstation OS: Mac
Platform: Unity
Platform version: Unity 6

Affected device:
Name: iPhone 16 Pro Max
OS: iOS 18

Screenshots / Video Recordings:
Video will be attached to showcase the issue.

IMG_3718.1.MP4
@shalesh-shekhar shalesh-shekhar added the bug-report Bugs and issues label Dec 5, 2024
@ptc-thesbyro
Copy link
Collaborator

Thank you for your report.

We will try and reproduce the auto focus issue and get back to you. Please note that this may take a little longer while we acquire the specific device.

@shalesh-shekhar
Copy link
Author

I hope you're doing well! I wanted to follow up on the status of this error. It's been a couple of weeks since the report, and I was wondering if there are any updates or an estimated timeline for when I might hear back about the reproduction results. If there's any additional information or testing on my end that could assist, please let me know. Looking forward to your response!

@ptc-thesbyro
Copy link
Collaborator

Hi,

We did not yet receive the device yet, so unfortunately, we do not have any updates. I think the only test you could do on your end is to try and reproduce the issue by running the app on a different iPhone 16 Pro Max with OS version iOS 18.

As we are nearing Christmas and new year vacation for many people, it's difficult to say when we will have updates. We could be lucky and receive the device within the next days and reproduce and fix the issue on the first try. If we don't, there's likely not any updates from us until the end of the first week of January.

@Archi97
Copy link

Archi97 commented Dec 22, 2024

+1
This issue also exists in my application.

My phone is a Samsung Galaxy Note10+.
Unity 2022.3.5, URP, Vuforia 10.27
While adding the script to autofocus when tapped twice works, the autofocus itself not working well.
What I noticed is that it works at the start, but after frame freezing (another issue on URP, the frame freezes for 0.5-1 sec), autofocus stops working and always focuses far away.

@ptc-thesbyro
Copy link
Collaborator

Hi @Archi97,

I will add your information to the bug ticket, however, your observed issue may be unrelated to the one seen on the iPhone 16. I would be surprised if it's Unity 6 (the common factor in your reports) that interferes with the focus modes. Have you tried reproducing the autofocus issue and frame freezing up in Unity 2022 LTS?

@Archi97
Copy link

Archi97 commented Jan 7, 2025

Hi @Archi97,

I will add your information to the bug ticket, however, your observed issue may be unrelated to the one seen on the iPhone 16. I would be surprised if it's Unity 6 (the common factor in your reports) that interferes with the focus modes. Have you tried reproducing the autofocus issue and frame freezing up in Unity 2022 LTS?

Hi @ptc-thesbyro .
I use Unity 2022.3. i believe it is URP problem.
During the freezes i noticed that the content's animation is still normal. So freeze happens on the camera+rendering part not the app it self.

@ptc-thesbyro
Copy link
Collaborator

Ah thanks for the correction. I misread that part.

@ptc-emaggio
Copy link
Collaborator

ptc-emaggio commented Jan 21, 2025

We have tested AutoFocus behavior on iPhone 16 Pro and what we see AutoFocus working however it is very very slow compared to other models and it takes up to 10 seconds to refocus on a change of scene depth. In some rare cases also the AF fails to trigger. The slow AF issue is limited to ARkit camera (which we internally use by default), and one can reproduce it even outside of Vuforia Engine (for example with one of the ARKit samples ).

I have started a thread in the Apple developers forum. If you experience this issue please raise its importance by clicking on the Boost button and adding a comment
https://forums.developer.apple.com/forums/thread/772721

@ptc-emaggio
Copy link
Collaborator

ptc-emaggio commented Jan 22, 2025

A workaround exists by disabling the platform fusion provider. In Unity select VUFORIA_FUSION_ONLY, in native code set usePlatformFusionProvider to false.

On iOS this switches off ARKit and Engine will use the standard AVFoundation camera API where autofocus is more responsive. Note that not all Engine features work with ARKit disabled (for details please see this page on Vuforia Fusion).

@Archi97
Copy link

Archi97 commented Jan 22, 2025

A workaround exists by disabling the platform fusion provider. In Unity select VUFORIA_FUSION_ONLY, in native code set usePlatformFusionProvider to false.

On iOS this switches off ARKit and Engine will use the standard AVFoundation camera API where autofocus is more responsive. Note that not all Engine features work with ARKit disabled (for details please see this page on Vuforia Fusion).

Will this step also work on Android?

@ptc-emaggio
Copy link
Collaborator

Will this step also work on Android?

@Archi97 it is possible as also on android by disabling the fusion provider Engine switches to the default Android camera API instead than ARCore. Still, the Android issue is completely unrelated to the iPhone one and we have not been able to reproduce it so far.

@ptc-emaggio
Copy link
Collaborator

@Archi97 regarding your AF issue could you please file a separate github issue indicating the exact steps to reproduce? In particular please add information if the issue happens after a tap event or if it is independent on the tap event.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-report Bugs and issues
Projects
None yet
Development

No branches or pull requests

4 participants