Search Unity

ARCore: Samsung S8 video stretched vertically

Discussion in 'ARCore' started by dddon, Sep 14, 2017.

  1. dddon

    dddon

    Joined:
    Jan 3, 2014
    Posts:
    6
    Hello, I'm facing same problem as this one:
    https://stackoverflow.com/questions...alaxy-s8-camera-image-is-stretched#new-answer
    Video stream in ARCore apps made in unity are stretched vertically (using Samsung s8). On Google Pixel , same apps works correctly. I'v tried Unity Beta 9 and 11.
    Its strange, because S8 is officially supported...
    The problem occurs only in Unity apps, native Android apps works property.
     
    thantieuhodo91 likes this.
  2. CarinaMclane

    CarinaMclane

    Joined:
    Mar 12, 2014
    Posts:
    23
    Do you have a screenshot? How pronounced is it? I have an S8 and haven't noticed any stretching, but if it is subtle that may be why?
     
  3. chaosemer

    chaosemer

    Official Google Employee

    Joined:
    Jul 5, 2017
    Posts:
    21
    Thanks for the bug report. We're working on a fix.
     
    thantieuhodo91 likes this.
  4. Florian-

    Florian-

    Joined:
    Aug 20, 2017
    Posts:
    5
    Any update on this?
    I'm facing the same issue and the video stream incorrect aspect ratio cause the tracking to appear floaty on one axis depending on which side I'm holding the S8.

    I could live with black bands if it gets me correct tracking. Did anyone managed to come up with a fix?
     
  5. thantieuhodo91

    thantieuhodo91

    Joined:
    Dec 3, 2014
    Posts:
    5
    I fixed it by building with aspect ratio 16:9.
    But at first, you should export project to Android Studio, then use Android Studio to config aspect ratio to 16:9.
     
  6. Florian-

    Florian-

    Joined:
    Aug 20, 2017
    Posts:
    5
    Thanks a lot for sharing !
    I'm completely unfamiliar with android studio though. I exported my Unity project in gradle format and added android:resizeableActivity="false" and meta-data android:name="android.max_aspect" android:value="1.78" to the manifest file with no luck. The resulting apk works fine but still no letterboxing for me.

    Could you detail the steps in Android studio ?

    edit:

    I almost got it. The piece I was missing was the S8 own full screen app options in the display settings. If I turn the full screen option off for my game I finally get black bands.
    It's only possible to turn off this option if you export in Unity with the aspect ratio parameter set as "legacy wide screen (1.86)".

    The tracking appears to be more accurate on horizontal movements now, but still not perfect.
    I guess the camera native aspect ratio is 16:9 (1.78) and now I'm just closer to it at 1.86.
    I'm still looking for a way to force a perfect 16:9 on my app to see if that results in correct tracking.
     
    Last edited: Oct 25, 2017
    thantieuhodo91 likes this.
  7. thantieuhodo91

    thantieuhodo91

    Joined:
    Dec 3, 2014
    Posts:
    5
    I only changed aspect ratio setting in Manifest then built and It worked.
    to show screen setting on Galaxy S8, you have to install Game Tuner.
    https://play.google.com/store/apps/details?id=com.samsung.android.gametuner.thin

    Open Game Tuner and set your app to be game type -> open game and you can set the screen size between fullscreen and 16:9.

    Goodluck!
     

    Attached Files:

  8. Florian-

    Florian-

    Joined:
    Aug 20, 2017
    Posts:
    5
    Thanks !! After Installing Game Tuner I have perfect aspect ratio and tracking :)
    The Android Studio step is not even required, Game Tuner letterbox app built directly from Unity just fine.
     
  9. thantieuhodo91

    thantieuhodo91

    Joined:
    Dec 3, 2014
    Posts:
    5
    oh, at Unity 's player setting, I set aspect ratio to Legacy Wide Screen (1.86) and It worked :D.
    So we don't need Android Studio to build :D.

    Thank you!
     
    Last edited: Oct 26, 2017
  10. iQuentin

    iQuentin

    Joined:
    Jan 18, 2017
    Posts:
    1
    The bug is said to be fixed in Unity 2017.3.0b5, but i still have the bug under Unity 2017.3.0b10 (as well as the b8, previously).
    I have also tried, though without success :
    - Aspect Ratio to Legacy Wide Screen (1.86) in Player Settings,
    - Adding android:resizeableActivity="false" and meta-data android:name="android.max_aspect" android:value="1.78" in Manifest (as suggested by @Florian- )

    If someone has another idea ?
     
    gentilcopain likes this.
  11. friuns

    friuns

    Joined:
    Jan 14, 2016
    Posts:
    22
    how do i change aspect ration with game tuner?