Start a new topic

Camera issues in editor on Windows 10

With the 8.3.0 SDK (and perhaps the previous SDK) the camera view can sometimes be distorted within the editor on Windows 10 when running in Unity 2018.2 and Unity 2018.3, but not in Unity 2018.1. And not on OS X. And we have seen this issue only on 2 of 4 Windows 10 computers. We have tested with embedded cameras, external web cams, and remote camera using the Unity Remote 5 Android app. Each of those cameras displays a different incorrect scaling and does not cover the full screen.


I have attached an example image of the video within the editor from a particular Windows 10 machine. The scaling of the image is wrong and there are black borders typically on the right side and top of the screen. We have seen reports of black or missing video in this forum and we are wondering if we are seeing a variation of that.


For now we will continue to use Unity 2018.1 as we haven't experienced these issues with 2018.1.

image.png
(135 KB)

This issue also occurs with the 'static image' camera. I have attached an example screen shot.

Hi,


Thank you for reporting this issue. This is the first report we've had with camera frame rendering not working correctly in the Editor, and I don't think it's connected to other reports that happen on specific devices.

We also couldn't reproduce the issue on our devices (Windows 10, Unity 2018.2). Does this issue happen in the example project provided in the download package as well, or just in your project?


Thank you,

Alexandru

It does seem to happen with the example projects in the download package.


This is a screen image from the unity editor on a second laptop (not the same one from the images above), running Windows 10 and Unity 2018.2.18f1. The laptop used in the previous images was a Microsoft Surface Book 2 and the image above is from a Lenovo ThinkPad X1. The image has a black bar on the side and has incorrect aspect ratio in that it seems stretched vertically or compressed horizontally. This is the scene "Object Tracking - Simple" in the example project. 


image


I found that when embedding the "Game" window in the editor program it would have correct aspect ratio but with black bars on the right and top sides. Popping it out of the editor (as I did in order to to the screen-copy) made the aspect ratio incorrect but with only the black bar on the right side.


We found the same issues with Unity 2018.3.6f1 when testing last week. So for now we will continue using 2018.1.9f2 for our Wikitude projects.

Hi, 


Is this issue still affecting you? I tried on both a Surface and a Lenovo ThinkPad device and still couldn't reproduce the issue. Have you noticed anything else that could help reproduce the issue?


Thank you,

Alexandru

Hi,


Yes we are still experiencing this issue. We have noticed other postings that seem to be the same issues that we are experiencing -


https://support.wikitude.com/support/discussions/topics/5000090729

https://support.wikitude.com/support/discussions/topics/5000091607


This is becoming more of a concern for us. As you know, the Google Play store will only accept 64-bit builds as of August, and we cannot produce 64-bit builds with Unity 2018.1.


Today I asked the team to see if the issue had gone away with Unity 2019.1,2f1, but the issue is still present.

Hi, 


Thank you for the update. The fact that there are multiple reports of this issue and we are still not able to reproduce it is very concerning for us. We're still trying some new things and looking at different hardware, but it might be a while until we find a solution. We might have to send out some custom builds with additional logging just to get some more information about what could be wrong.


I'm not sure if this is a viable option for you, but the 2017.4 LTS releases can also produce 64-bit builds, and I assume this issue is not present there. Of course, downgrading the project might not be possible for you.


We'll let you know as soon as we have some news.


Thank you for your patience,

Alexandru

Hi Alexandru


We downloaded the 8.5 update and retried it with Unity 2018.3 and 2019.1.2. The issues with the camera offset, scaling and cropping are still present. We have posted a video that illustrates the problem - https://youtu.be/wRlie-3N0Q4. This video was made on a Microsoft Surface book 2.


It is at least an inconvenience for us in that we will need to author the Wikitude apps in an earlier editor than we will build the release versions with. And including any features of later versions of Unity (such as the new AR features offered in Unity 2019) will be problematic.

Hi, 


Attached you will find a new version of the WikitudeUnityPlugin.dll file which contains additional logging related to camera rendering. If possible, please replace the one in /Assets/Wikitude/Dependencies/ with this one and send us the logged values. They should look something like this:


Screen.width: 540 Screen.height: 383
CurrentTexture.width: 1280 CurrentTexture.height: 720
_feed.deviceName: FaceTime HD Camera
_feed.requestedWidth: 640_feed.requestedHeight: 480
_feed.width: 1280_feed.height: 720
_feed.texelSize.x: 0.00078125_feed.texelSize.y: 0.001388889
Camera Angle: 0
cameraFrameAspectRatio: 1.777778
scaling.x: 1.260905 scaling.y: 1
UnityEngine.Debug:Log(Object)


The .dll is compatible with the 8.5 release.


Thank you,

Alexandru

dll

Hi,

I had the same problem and I tried to replace the WikitudeUnityPlugin  that you gave but there is an issue. now i  have a black screen instead of a cropped screen.


I'm currently looking for solutions but my errors are the following :

 

TypeLoadException: Could not load list of method overrides due to assembly:C:\Users\lmougin\Documents\Unity3D\Projets\WikitudeProject\Assets\Wikitude\Dependencies\WikitudeBridge.dll type:IPlatformBridge member:void {0}(intptr) signature:InitializeCoordinateSystem

System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor (System.RuntimeTypeHandle type) (at <23c160f925be47d7a4fd083a3a62c920>:0)

Wikitude.BridgeFactory..cctor () (at <38e43d3a963543259c454dd3f5c33dad>:0)

Rethrow as TypeInitializationException: The type initializer for 'Wikitude.BridgeFactory' threw an exception.

Wikitude.WikitudeSDK.CreateWikitudeBridge () (at <f70e8761daad42caa5a92eb4e46f11f6>:0)

Wikitude.WikitudeSDK.get_WikitudeBridge () (at <f70e8761daad42caa5a92eb4e46f11f6>:0)

Wikitude.WikitudeCamera.OnApplicationPause (System.Boolean paused) (at <f70e8761daad42caa5a92eb4e46f11f6>:0)



MissingMethodException: void Wikitude.IPlatformBridge.InitializePlatformCamera()



TypeLoadException: Could not load list of method overrides due to assembly:C:\Users\lmougin\Documents\Unity3D\Projets\WikitudeProject\Assets\Wikitude\Dependencies\WikitudeBridge.dll type:IPlatformBridge member:void {0}(intptr) signature:InitializeCoordinateSystem

System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor (System.RuntimeTypeHandle type) (at <23c160f925be47d7a4fd083a3a62c920>:0)

Wikitude.BridgeFactory..cctor () (at <38e43d3a963543259c454dd3f5c33dad>:0)

Rethrow as TypeInitializationException: The type initializer for 'Wikitude.BridgeFactory' threw an exception.

Wikitude.WikitudeSDK.CreatePlatformBridge () (at <f70e8761daad42caa5a92eb4e46f11f6>:0)

Wikitude.WikitudeSDK.get_PlatformBridge () (at <f70e8761daad42caa5a92eb4e46f11f6>:0)

Wikitude.WikitudeCamera.get_CameraTexture () (at <f70e8761daad42caa5a92eb4e46f11f6>:0)

Wikitude.WikitudeCamera.Update () (at <f70e8761daad42caa5a92eb4e46f11f6>:0)







PS : I forgot to say that I am using Unity 2019.2.0b3

Hi Alexandru,
I am part of Peter Oberdorfer's team here at Tactic.

This is the log:

 

Screen.width: 1015 Screen.height: 997
CurrentTexture.width: 640 CurrentTexture.height: 480
_feed.deviceName: Microsoft Camera Front
_feed.requestedWidth: 640_feed.requestedHeight: 480
_feed.width: 640_feed.height: 480
_feed.texelSize.x: 0.0015625_feed.texelSize.y: 0.002083333
Camera Angle: 0
cameraFrameAspectRatio: 1.333333
scaling.x: 1.309688 scaling.y: 1
UnityEngine.Debug:Log(Object)
Wikitude.WikitudeCamera:SetGL()
Wikitude.BackgroundCamera:OnPostRender()

Thanks for the assistance with this, and sorry for the late reply, we were gearing up for AWE. It was good to see part of your team at AWE.

Norman 
Tactic

Hi


I just downloaded the WikitudeUnityPlugin.dll file that you posted. I tried it with a Wikitude project of ours with the new version of Unity that was released today - Unity 2019.1.5f1 on Windows 10.


I see the same "TypeLoadException" error message for signature:InitializeCoordinateSystem as Louis Mougin posted above. Also the black screen.


After that message occurs there is a second error message:


> MissingMethodException: void Wikitude.IPlatformBridge.InitializePlatformCamera()


Then sometime after that the TypeLoadException message occurs over and over again.


NOTE: we have set our Scripting Runtime Version to ".NET 4.x Equivalent" as this is necessary to use the TextMeshPro 2.0.1 package. I think the default used to be ".NET 3.5 Equivalent" so this might be a non-standard setting.

Regarding Norman's post above, he was testing with Unity 2018.3, with "PC, Mac & Linux Standalone <DX11>" platform setting. He was testing one of the existing Wikitude demo projects.


Regarding my post above, my platform was set to "Android". I changed it to "PC, Mac & Linux Standalone <DX11>" setting but the errors I saw did not change.


When both of us switched to the regular WikitudeUnityPlugin.dll we did not get errors, but there were the previously encountered issues with the camera display - the offset/scale/cropping issues as reported before.

We've done more testing - now that we have time between projects.

Current Unity version 2018.3.0 and 2019.1.2
Wikitude sdk 8.5
Using the wikitude demo project

The Input Plugins API for Unity states that it can be used to correct incorrect aspect ratios. Our current work around is to try to get this to work.

The Plugin - Advanced Custom Camera scene works, centering the camera view, however the camera aspect does not scale when using a 9:16 aspect and instead tiles.

image



The Plugin - Simple Custom Camera just returns a black screen.

I've narrowed it down to the input module of the the plugin component. When using the plugin input module (to gain access to the CameraFrame) we get a black screen, presumably because our scripts are wrong.



Edit:  (By deleting the old post. You guys should add an Edit button for these forum posts)
It looks as though even if we recenter the image via the Plugin API, there is still an offset to the actual Trackable Object.

image



Login or Signup to post a comment