MixedRealityToolkit-Unity icon indicating copy to clipboard operation
MixedRealityToolkit-Unity copied to clipboard

Introducing SpectatorView into MRTK

Open danielescudero opened this issue 8 years ago • 31 comments

Hi Everyone, Lighthouse London guys here (part of MCS Mixed Reality Studios). After some initial conversations with @timGerken , @keveleigh and @davidkline-ms we've finished the first version of SpectatorView for the MRToolkit. This new system allows iOS ARKit-enabled devices to witness and record what HoloLens users are experiencing, just like spectator view, but cheaper and faster. SpectatorView takes care of handling multiple sessions, automatic networking, recording and syncing space so phones see where holograms are.

The files are ready to be integrated into MRTK (2017.2.1.3). In order to do so we'd like to understand where in the toolkit this section of work should sit. Currently we have unity component and a native code component, which has a dependency on the OpenCV libraries.

Also, we have had issues building against the toolkit on the mac due to the GLTF component (inside MRTK) not being compatible with Mac. The GLTF component needs to be platform safe, and it's currently the only module inside MRTK that's not.

We'd love to know how to proceed. Best Dan Escudero

danielescudero avatar Mar 23 '18 12:03 danielescudero

Looking forward to seeing this make its way in!

What error do you see with GLTF when building for Mac?

keveleigh avatar Mar 23 '18 16:03 keveleigh

Just spoke with @danielescudero,

He will be creating an ARCA folder underneath HoloToolkit for their components, scripts and documentation.

The OpenCV dependency will be documented and tested to insure that the lack of OpenCV does not break building the toolkit or any functionality (other than ARCA becoming a noop).

A new issue will be opened re: the GLTF script(s) not being platform safe and will recommend their clients remove it from their ios builds.

An example scene is ready and will be added in the PR :)

david-c-kline avatar Mar 23 '18 16:03 david-c-kline

@keveleigh All scripts using GLTF causing issues only when building for iOS. For example: Assets/HoloToolkit/Utilities/Scripts/GLTF/Scripts/Cache/MeshCacheData.cs(2,7): error CS0246: The type or namespace name `GLTF' could not be found. Are you missing an assembly reference?

danielescudero avatar Mar 23 '18 17:03 danielescudero

Updated initial issue comment to match the feature name.

david-c-kline avatar May 04 '18 18:05 david-c-kline

@danielescudero If you check the include platforms to include iOS, do you still see that?

image

keveleigh avatar May 04 '18 18:05 keveleigh

@keveleigh screen shot 2018-05-04 at 12 51 42 It stopped complaining but now throws this error when iOS is included. ArgumentException: The Assembly Newtonsoft.Json is referenced by GLTFSerialization ('Assets/HoloToolkit/Utilities/Scripts/GLTF/Plugins/GLTFSerialization/GLTFSerialization.dll'). But the dll is not allowed to be included or could not be found.

danielescudero avatar May 04 '18 20:05 danielescudero

Does adding the same checkbox on the non-UWP Newtonsoft DLL fix that?

keveleigh avatar May 04 '18 20:05 keveleigh

Nope, throws: TypeLoadException: Could not load type 'GLTF.Math.Matrix4x4' from assembly 'GLTFSerialization, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. UnityEditor.Build.BuildPipelineInterfaces.InitializeBuildCallbacks (BuildCallbacks findFlags) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildPipelineInterfaces.cs:115) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

Error building Player: TypeLoadException: Could not load type 'GLTF.Math.Matrix4x4' from assembly 'GLTFSerialization, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.

danielescudero avatar May 04 '18 21:05 danielescudero

This was released in the 2017.4.0.0 release candidate

david-c-kline avatar May 25 '18 03:05 david-c-kline

Trying to build and test an example of Spectator View, hololens is ok, but during iOS building in Unity I've received some errors (1st screenshot), added iOS platform for Newtonsoft.Json.dll (2nd screenshot) and after that, I get some more problems (3rd screenshot). Maybe somebody knows how to fix it? 1 2 3

ilyavitek avatar Jun 05 '18 13:06 ilyavitek

@TobyGilbert-ms @JoseSantano-ms

timGerken avatar Jun 05 '18 14:06 timGerken

@ilyavitek In player settings> other settings, change api compatibility level to from .NET 2.0 subset to .NET 2.0. It solved the same issue for me.

ChauNTran avatar Oct 29 '18 15:10 ChauNTran

I have built both of the versions, but problem is after iOS app show code HoloLens not responding. Should example scene show at least something when it is not connected to iPhone app (for me it's only splash screen and then nothing, without errors)?

ilyavitek avatar Nov 14 '18 15:11 ilyavitek

@ilyavitek is the HoloLens camera light turning on when iPhone displays the code?

danielescudero avatar Nov 14 '18 17:11 danielescudero

@danielescudero nope. In HoloLens app I can see only splash at the beginning and nothing else (is it ok?). I'm trying to launch a sample scene with spectator view.

ilyavitek avatar Nov 15 '18 11:11 ilyavitek

That’s not what should be happening. Your HL app should work normally independent of any iPhone joining the session, so HL app should show you your holograms. I’m sure there was a similar comment from someone some months ago. Let me look this up.

danielescudero avatar Nov 15 '18 15:11 danielescudero

@ilyavitek What version of MRTK are you using? If you run the app from the Unity Editor, do your holograms appear? This thread solves the same issue. Look towards the end of the thread: https://github.com/Microsoft/MixedRealityToolkit-Unity/issues/2438

danielescudero avatar Nov 15 '18 20:11 danielescudero

@danielescudero MRTK Version: 2017.4.2.0 In Unity Editor when app switched for HoloLens build and I press play everything seems ok. Thank you for link to thread.

ilyavitek avatar Nov 16 '18 09:11 ilyavitek

@danielescudero It seems that my problem was that I was thinking that plugin is already in the project. But I need to build it. Now I'm struggling with building plugin. It failed at the "Install OpenCV Contrib for UWP" step :( https://github.com/Microsoft/vcpkg/issues/4745

ilyavitek avatar Nov 16 '18 13:11 ilyavitek

image

I am struggling to build IOS spectator view

CMLeshiba avatar Dec 10 '18 07:12 CMLeshiba