Search Unity

Object size different for iOS and Android

Discussion in 'Vuforia' started by pahe, Oct 9, 2018.

  1. pahe

    pahe

    Joined:
    May 10, 2011
    Posts:
    543
    Hey guys.

    I'm currently having the problem that my spawned objects are different in size for iOS and Android platform. There is no custom scaling involved and while it looks perfectly fitting on iOS, the objects on Android are scaled smaller (around 70-80% I'd say).
    I'm using the latest Vuforia SDK (7.5.20) and ARCore 1.4 on Android which makes the experience nice and stable.

    Is there a way to get the info of the internal scaling of the objects, so I can compare the values for both platforms?
    Or has anyone else experienced size differences on different platforms?

    Thanks for help!
     
  2. meedabit

    meedabit

    Official Vuforia Employee Vuforia

    Joined:
    Dec 8, 2016
    Posts:
    266
    Hello,

    This has been observed previously and is likely related to differences in ARKit and ARCore. In our experience, ARKit's scale estimation is better than ARCore's. My expectation is that you will see a wider range of scale differences across ARCore devices compared to ARKit, but I have no data to back this up. It's only a cumulative observation from our internal testing.

    Based upon the feedback above, I don't think you'll find a scaling factor that would rectify observed differences between ARKit and ARCore devices. You may want to consider implementing a "pinch scaler" that allows users to resize an augmentation based upon their environment. You can find a sample implementation in our 7.5.20 Core Samples in the 3-GroundPlane scene under Anchor_Placement->Chair (TouchHandler.cs). In the sample, it can be enabled by checking the "Enable Pinch Scaling" box.

    Thanks,
    Vuforia Engine Support
     
    pahe likes this.
  3. pahe

    pahe

    Joined:
    May 10, 2011
    Posts:
    543
    Alright, I can totally understand that it's problematic to handle the huge range of different Android devices. From my understanding the Image Marker should help in this case to scale the objects correctly. We're using the Image Marker at the start to "active" the UI (which isn't really necessary, but that's how it worked in the past and we never changed it). Is there a way that the Image Marker can help us figuring out which scaling the plugin is using for the augmented object scaling? And if so, can we change it? If not, we could maybe calculate the correct scaling from it then.

    We would really like to avoid the manual scaling of the objects, as we want the behaviour as convinient for the user as possible.

    Thanks!
     
  4. meedabit

    meedabit

    Official Vuforia Employee Vuforia

    Joined:
    Dec 8, 2016
    Posts:
    266
    Hello,

    I would agree that using an Image Target of known size could help with determining the scaling factor of your augmentation. You can get the actual 2D size (width and height) from the ImageTarget class, using the GetSize() method, see: https://library.vuforia.com/content...aviour.html#a84343e9d384d8b7e87d836a4684c69dd. You could then use that as ground truth for calculating the scaling factor of the augmentation? Just a thought...never done it before.

    However, to be clear, this would be changing the size of the augmentation and not the scale estimation coming from the tracker (and is responsible for the size variations you are observing). Although Vuforia "seeds" an initial estimation of 1.4 meters, the tracker itself sets the final scale value. Thus, any physics on a resized augmentation may not exhibit realistic behaviors.

    Thanks,
     
    pahe likes this.
  5. meedabit

    meedabit

    Official Vuforia Employee Vuforia

    Joined:
    Dec 8, 2016
    Posts:
    266
    Hello,

    After some additional internal discussions about your observations, the point was made that perhaps you can confirm that ARCore is properly enabled by Vuforia on your device.

    Suggest you use the GetActiveFusionProvider() API:

    https://library.vuforia.com/content...lities.html#ac4b8cf538fb9fdf91552f398de6fe33d

    I believe Vuforia log messages will also indicate whether ARCore has been enabled or not:

    $ adb logcat AR:D *:S


    Thanks,
    Vuforia Engine Support
     
    pahe likes this.