Search Unity

  1. Unity wants to learn about your experiences working on a Unity project today. We'd like to hear from you via this survey.
    Dismiss Notice
  2. Get the latest news, tutorials and offers directly to your inbox with our newsletters. Sign up now.
    Dismiss Notice
  3. Read here for Unity's latest plans on OpenXR.
    Dismiss Notice

iPad camera zoomed in

Discussion in 'AR' started by jdgauchat, Oct 15, 2018.

  1. jdgauchat

    jdgauchat

    Joined:
    Jun 24, 2017
    Posts:
    18
    Hi, guys. The iPad's camera in ARKit is zoomed in when compared to the iPhone's camera. Is this normal? Is there any solution to set the normal zoom of the camera on iPads?

    Thanks
    JD
     
  2. whogas

    whogas

    Joined:
    Oct 18, 2013
    Posts:
    46
    This is just a perception thing. Everything is the same size, it's just that the screen is larger on the iPad. I proved this to myself (and others) by placing a dollar next to the same rendered object on both devices and ensuring everything was the same size.
     
  3. jdgauchat

    jdgauchat

    Joined:
    Jun 24, 2017
    Posts:
    18
    Hi. I took pictures to be sure, and they are of different sizes. Here are the pictures. The one on the left is from the iPhone while playing the game, and the one in the middle is from the iPad while playing the game. Here you can see that the ARKit camera for the iPad is zoomed in. The last one is from the iPad's camera, so you can compare. This last one is similar to the iPhone, but the ARKit camera for the iPad is zoomed in, no doubt about it. And the code is the same, I didn't modify anything and I was standing in the same place for each picture.
     
  4. jdgauchat

    jdgauchat

    Joined:
    Jun 24, 2017
    Posts:
    18
    One additional note. With the iPad, my game takes twice the time to find anchors in the scene. My guess is that this is the consequence of the image being zoomed in. You can see that the image on the iPad running the ARKit application is not only zoomed in but also blurry.
     
  5. GreeneMachine

    GreeneMachine

    Joined:
    Jul 3, 2015
    Posts:
    126
    I am seeing same behaviour on iPad 2017..not sure why.. is unity reducing resolution by cropping camera feed for better performance or something?
     
  6. pojoih

    pojoih

    Joined:
    Mar 30, 2013
    Posts:
    193
    Not Unitys fault. When you switch to high speed video capture in the camera app you see the same zoom. ARKit uses 60fps video and seems this has to be cropped for some reason (resources, heat...).
     
  7. GreeneMachine

    GreeneMachine

    Joined:
    Jul 3, 2015
    Posts:
    126
    @pojoih yeah i see what you mean. Theres alot of similar talk when using vuforia too.
    Doesnt unity throttle arkit to 30fps if you dont override it with application.targetframerate
    I'd like the option to control this camera behaviour myself.. maybe I can in xcode?
    It doesnt do this when building for android/arcore.
    Thoughts?

    Edit: ipad 2017 doesnt support 60fps video. It looks like the cam feed is what it is.. on this device anyway. I dont have access to a pro.
     
    Last edited: Oct 22, 2018
  8. jimmya

    jimmya

    Unity Technologies

    Joined:
    Nov 15, 2016
    Posts:
    793
    Indeed as others have pointed out here, this is not Unity doing something special, but ARKit. ARKit uses a smaller FOV on iPad as many of you have noticed, which may help with the amount of image processing needed to get a performant result. You can check this with a non-Unity ARKit app - it should do the same thing. There is no way currently to tell ARKit to use a different FOV.

    ARKit does allow you to control the resolution of the video (see https://bitbucket.org/Unity-Technol...Plugin/Examples/ARKit1.5/UnityARVideoFormats/) which can help for performance issues.
     
  9. yjcnbnbnb200

    yjcnbnbnb200

    Joined:
    Nov 1, 2017
    Posts:
    25
    I have a question, which value did you use as FOV on unity camera? I use iPad 2018 as my test machine. Thanks!
     
  10. jimmya

    jimmya

    Unity Technologies

    Joined:
    Nov 15, 2016
    Posts:
    793
    It does not use the FOV that you set on the camera. Rather it asks ARKit for the camera projection matrix, which depends on the calculated FOV for whatever camera ARKit is using.
     
    yjcnbnbnb200 likes this.
  11. yjcnbnbnb200

    yjcnbnbnb200

    Joined:
    Nov 1, 2017
    Posts:
    25
    Thanks Jimmya
     
unityunity