Log in or register to post comments

Camera FOV wrong size (Black border) - Unity 2017.3.0f2

December 17, 2017 - 12:19pm #1

Hey!

 

Issue:

We recently upgraded a project to the Unity beta 2017.3.0f2 in hopes to try out the new Vuforia update. After the upgrade we found the camera had FoV issues that create a border around the camera feed changing colour depending on what the camera's background colour is set to.

The issue at first looks as if the background plane doesn't scale to fill the whole screen, but upon further investigation we found the FOV wasn't actually adjusting to the correct value. When you first launch the application it seems fine, but when you press the home button and reenter the application it would adjust the scale again, sometimes it would fill the screen but most of the time it wouldn't.

The issue was seen on an iPhone 8, 7 6, and iPhone X. The size of the border that is visible is different on each device. The iPhone X at times can have a very tiny one you almost don't see.

We noticed in Xcode that at times ARKit would disrupt the camera even though the project wasn't using ARKit at all. The error thrown was:

[Session] Session (0x1414860c0): did fail with error: Error Domain=com.apple.arkit.error Code=102 "Required sensor failed." UserInfo={NSLocalizedRecoverySuggestion=Make sure that the application has the required privacy settings., NSLocalizedDescription=Required sensor failed., NSLocalizedFailureReason=A sensor failed to deliver the required input.}

This doesn't seem to be the exact problem with the fov, as the issue appears even when this error isn't thrown. But it definitely disrupts vuforia at times.

 

What we have tried:

We have tried re initialising the camera, starting and stopping the camera, and then just simply rescaling the background plane. We found the best solution so far was when resuming the application, wait for the camera to be activated then change the FOV of the camera. Vuforia then, readjusts the camera to the correct FOV that fills the screen correctly. It's a very hacky fix, but it's working for us. There is also the side issue that at times the camera can take 2-3 seconds to start up when resuming the application, but if it has no borders we are fine with it.

 

Is the issue described a known issue? Doesn't anyone know of an alternative fix?

 

Edit:

It seems this is actually more related to the camera field of view. A temp fix I have is to set the Camera.main.fieldOfView to 30 and then vuforia seems to notice it's changed and resets it. When it resets the field of view the background plane fits the camera view again.

Edit 2: 

I updated the thread title and this post to describe the issue more clearly. Instead of discussing the background plane not scaling correctly.

 

 

Camera FOV wrong size (Black border) - Unity 2017.3.0f2

May 30, 2019 - 2:03pm #21

Still not fixed. Running on iPhone Xs, built with Unity 2019.1.3f2. Sometimes it works, sometimes it doesn't. Attached is a screenshow showing how it looks like when it doesn't. Works good on Android devices.

(The camera plane is obviously meant to fill the entire screen).

AttachmentSize
Image icon image_from_ios.png5.85 MB

Camera FOV wrong size (Black border) - Unity 2017.3.0f2

February 14, 2019 - 1:32pm #20

Hello Vuforia,

Is this resolved yet?

Thanks

Camera FOV wrong size (Black border) - Unity 2017.3.0f2

December 13, 2018 - 6:09am #19

Hello,

this is NOT fixed yet. It happens still in 2018.2.14. Now it is a 1-px flickering border around the camera image and it only appears from time to time.

I could see it immediately because my camera background color was not black but grey. When it is black you can still notice it though.

Is there a Unity Bug Report I can vote for?

[Edit] Found it here, please vote for it: https://issuetracker.unity3d.com/issues/ios-vuforia-background-plane-doesnt-fill-the-entire-screen

 

Camera FOV wrong size (Black border) - Unity 2017.3.0f2

November 9, 2018 - 11:08am #18

Hello. Any news about this issue? I also have this problem...

I tried with the code that @edwardpin posted but does not help.

Thanks.

Camera FOV wrong size (Black border) - Unity 2017.3.0f2

July 30, 2018 - 5:33am #17

Did you post that question on the Unity forum (https://forum.unity.com)?

If you posted it, could you please tell me the URL?

 

I want to tell them that "I strongly hope to be backported to Unity 2017.4".

Camera FOV wrong size (Black border) - Unity 2017.3.0f2

July 30, 2018 - 5:16am #16

I have the same issue on "Unity 2017.4.2f2".

 

When I try this probrem  on "Unity 2018.2.0f2", but it did not occur.

I looked for bug fixes from release notes of "Unity 2018.2.0f2", but I could not find it.

However, I guess that the bug fix was done.

 

I hope that it will be backported to "Unity 2017.4".

Camera FOV wrong size (Black border) - Unity 2017.3.0f2

March 7, 2018 - 11:52pm #15

Reply from Unity QA in regards to this bug:

"Current milestone is set to version 2018.2 and priority is set to Average. I cannot say the exact date it will be fixed..."

Camera FOV wrong size - Unity 2017.3.0f2

March 5, 2018 - 6:45am #14

I have the same problem, I write about that in this post: https://developer.vuforia.com/forum/issues-and-bugs/black-borders-arcamera-view

no solution for now..

Anibody with a fix?

Camera FOV wrong size - Unity 2017.3.0f2

January 13, 2018 - 7:36pm #13

Thanks for that. Yeah it didnt seem to fix the iPhone X -hopefully they’lll release a patch/fix soon.

Camera FOV wrong size - Unity 2017.3.0f2

January 12, 2018 - 3:56am #12

Hey sorry Magglemitch,

Attached is the fix i wrote, It's very hacky but it does the job. Just put the script on a gameobject in your scene and it will run when ever the app starts / resumes from pause or if you press space bar in the editor. I think there is still a small chance for tiny borders on iPhone X, but it removes them on other devices.

 

 

AttachmentSize
Package icon CameraFOVFix.cs_.zip1.52 KB

Camera FOV wrong size - Unity 2017.3.0f2

January 11, 2018 - 1:32am #11

Did you manage a quick fix until it gets addressed in an update? I've tried setting the FOV at the start of the scene so that it autocorrects itself, but I still get borders on the launch of the app every time. However, when I go back into the app (resume), it'll go full screen.

 

Hoping to be able to find a fix for this soon as its kinda delaying me being able to update the app.

Camera FOV wrong size - Unity 2017.3.0f2

January 9, 2018 - 11:39pm #10

Update:

Unity QA has been able to recreate the bug and has forwarded the issue to their developers.

Camera FOV wrong size - Unity 2017.3.0f2

January 5, 2018 - 3:54pm #9

Manage to find a fix for this? On iPhone X I am sometimes getting black borders on the top and bottom. Sometimes the camera renders full screen, but most of the time the borders are there.

Camera FOV wrong size - Unity 2017.3.0f2

January 5, 2018 - 1:02pm #8

Did you manage to solve this issue? I’m getting black borders (only on the top and bottom) sometimes in the iOS build for iPhone X.

Camera FOV wrong size - Unity 2017.3.0f2

January 3, 2018 - 5:14am #7

Hi Strasza,

Sorry i was away during the holiday break.

I was able to recreate the issue this morning. I used Unity v2017.3.0f3 and the Vuforia Core Samples pack from the asset store v7.0.43.

I made a build on an iPhone 8. At first the issue wasn't appearing, so I stopped the application from running via Xcode and restarted the application again. When I ran the application again the issue was recreated very easily. The issue appeared in both Image Targets scene, and the Cloud Reco scene (I didn't test the other scenes). Please take note that the camera background colour is set to black so it's easy to miss unless you minimise the application (See screen shots attached).

 

 

AttachmentSize
Image icon IMG_0410.JPG3.34 MB
Image icon IMG_0411.JPG3.4 MB

Camera FOV wrong size - Unity 2017.3.0f2

January 1, 2018 - 1:33pm #6

I have this occasionally happening in builds to an iPhone X

Camera FOV wrong size - Unity 2017.3.0f2

December 27, 2017 - 3:10pm #5

Hello edwarpin,

I attempted to reproduce this issue on an iPhone 6, 6s, and 7 and was unable to. I used the core samples, ground plane sample, and a barebones project containing just a scene with an ARCamera and an Image Target or Ground Plane Stage + Finder. I backgrounded the app multiple times and never saw a border around the camera field.

Were you able to reproduce this issue within the samples? Could you share a small project that reproduces this if not?

Thanks,

Vuforia Support

Camera FOV wrong size - Unity 2017.3.0f2

December 27, 2017 - 1:46am #4

Bumping this.

It would be nice to get a response as to whether this is a bug or something im doing wrong on my side. I have also submitted a bug report to Unity and haven't received confirmation yet.

Background plane wrong scale - Unity 2017.3.0f2

December 21, 2017 - 12:22am #3

Tested again today with Unity 2017.3.0f3 and the issue persists.

Background plane wrong scale - Unity 2017.3.0f2

December 19, 2017 - 8:07pm #2

We're also experiencing this issue and surprisingly, the public release of 2017.3 today does not include a fix for this nor the camera focus.

It would be great if we had the ability to rollback to a previous version of Vuforia.

Log in or register to post comments