microsoft / MixedRealityCompanionKit

This is a MixedRealityToolkit style repository for code bits and components that may not run directly on Microsoft HoloLens or immersive headsets but instead pair with them to build experiences.
MIT License
596 stars 288 forks source link

Update SpectatorView to support at least Unity 2017.2 and work with the MRTK #239

Closed FejZa closed 6 years ago

FejZa commented 6 years ago

Getting the SpectatorView to work with Unity 2017.2 only requires some namespace changes but most importantly I think SV should not have it's own subset of the MRTK but instead work as an Addon to the main MRTK.

Are there already any plans or work in progres for this? Otherwise I will have a look at it and eventually create a PR.

jerrygg commented 6 years ago

This is an urgent function.Can anyone answer it?

FejZa commented 6 years ago

Hi,

I finished upgrading the sample to min. 2017.2.0 compatibility and made a Pull Request a while ago. Unfortunately I had to cancel it, because it contained 1000+ "changed files". Asuming it was meta-Files with fixed line endings I tried and made all nececassy changes again. But I still get 900+ changed Files, which the admins might not accept.

HERE'S THE PROBLEM: The current sample uses a really old version of the MRTK (formerly HoloToolkit). Only updating this Toolkit to the latest 2017.2 version, leads to a vast amount of changed / added / removed files, which leads to tons of changed files in the commit. I tried to sort out all not needed files of the MRTK but this is really a pain!! Which leads me back to the original question: Why not have the full MRTK in the sample? The sample can serve as a starting Point (template) for any SpectatorView Project and should provide the full MRTK.

I need a clarification here so I can finish my Pull Request. If the Admins will reject my Pull Request with 900+ changes files again, I might as well leave it as it is.

Thanks.

NeerajW commented 6 years ago

@fieldsJacksonG thoughts?

eirikhollis commented 6 years ago

@FejZa If that pull request uses the latest release of MRTK (or anything close to it), I would LOVE to take a look at it. Currently struggling making the SpecatorView work in 2017.3 with the latest MRTK dev branch.

DiegoMolero commented 6 years ago

@FejZa could be possible to have the updated version SpectatorView in another branch or repo?. I am currently working on a project with unity 2017.2 and the latest MRTK and we were not able to make working the sharing holograms and spectator view 😢

FejZa commented 6 years ago

Hi @eirikhollis / @DiegoMolero,

I'll push the changes to my fork this Weekend so you can give it a try. I am using it with Unity 2017.2.0f3 because all versions above seem to have an issue with the stabilization plane on HoloLens (not SpectatorView related).

Other than that 2017.3+ should work fine once that issue is solved.

FejZa commented 6 years ago

Hi guys,

you can find an updated SV sample in my fork of the repository. It contains the full MRTK, except the SharingWithUNet part because that part has a specific implementation for SV.

Tested with: Unity 2017.2.0 Unity 2017.2.1 Unity 2017.3 Elgato HD60S Capture Card GoPro Hero 5

Please note: Unity 2017.2.1 currently has some issues with hologram jittering and tracking loss without recovering, so you should avoid that Version. Unity 2017.3 has a new Setting in the XR Player Settings. Unfold the Little arrow next to "Windows Mixed Reality" and check "Enable Depth Buffer Sharing" to resolve the jittering mentioned above. I currently recomment to use Unity 2017.2.0 for HoloLens development, but that's just my experience.

DiegoMolero commented 6 years ago

Thank u mate!

DiegoMolero commented 6 years ago

Hi, We have been tried to connect 2 hololens for sharing holograms using the SharedHologram sample. When I connect using the editor with the configuration recommended in the tutorial using the scene SpectatorViewManager everything works fine. Here is the problem when trying to pair two hololens. One is named "spectatorviewdevice" and the other "serverdevice". Everything seems woking fine, DLLs as well. Both have the same configuration of the Spectator View Manager script. Here is the config we have: captura_client

When we initialize the app with "serverdevice" hololens nothing happend in "spectatorviewdevice" like in the picture. captura How can we connect them? I am sorry for the inconvenience, we are still novices in this field. Thanks!

eirikhollis commented 6 years ago

Firstly, make sure they are connected to the same network. Secondly, see if the connection is blocked by the firewall on the server machine. If you are using a Windows machine, go to "Windows Defender Firewall with Advanced Security" and click on "Inbound Rules". Allow the Unity version you are using through the firewall, as well as "Unity Editor".

Some routers/networks block the connection between the Hololenses. See if a mobile hotspot set up from a PC or phone helps.

From SpectatorView Readme:

Network Setup

jerrygg commented 6 years ago

Is there still anyone doing SpectatorView updates? When is it possible to support MRTK, this is very urgent for our developers! !

jerrygg commented 6 years ago

This is related to whether we can join MRPP!

eirikhollis commented 6 years ago

@jerrygg Of course it won't be plug and play from the beginning, but If you swap out the sharing part of the newest MRTK release with the sharing folders from MRCK (plus necessary SpectatorView files), you should be able to get it working in a couple of days within a week in Unity 2017.2.0 ++.

Or just check out @FejZa's #249 pull request fork on github.

FejZa commented 6 years ago

Hi guys,

please check out my fork here on GitHub: https://github.com/FejZa/MixedRealityCompanionKit

It's working and tested with Unity 2017.2+ and contains the MRTK. Don't know what's going on but it looks like nobody cares about this repository anymore.

jerrygg commented 6 years ago

@FejZa I have read your project, but it still uses HoloToolkit, not MRTK.

jerrygg commented 6 years ago

@FejZa qq 20180316153845

eirikhollis commented 6 years ago

You do know that the latest MRTK release also uses the Holotoolkit namespace, right?

capture

jerrygg commented 6 years ago

@eirikhollis Sorry, I have been developing with Dev_Working_Branch, because the Master is missing a lot of UX functions, the namespace in Dev_Working_Branch is all changed to MixedRealityToolkit 28

eirikhollis commented 6 years ago

@jerrygg Yes, of course, but even if there were any development on the MRCP, they would most definitely target the latest MRTK releases rather than the dev branch.

However, as I mentioned earlier, you could try to do that yourself either by starting with @FejZa's fork and updating all MRTK files, or by taking the latest dev branch and swap out the sharing folders with the folders in MRCP.

Both these solutions are most certainly not plug n play, and would require a lot of debugging. Either that or you could sacrifice the changes made within UX from the master to dev branch in MRTK, and make it work with @FejZa's fork.

FejZa commented 6 years ago

I agree. I am using the latest stable MRTK which still has the HoloToolkit namespace. But upgrading should be possible more easily using my fork than the original one for you.

FejZa commented 6 years ago

Also of course, Spectator View is and most likely will not be for a long time to come "Plug-n-Play". Depending on your use case it will always require some adjustments.

jerrygg commented 6 years ago

@FejZa @eirikhollis Thank you for your reply, if you have a development plan that supports the new namespace MixedRealityToolkit, please remind me.

GennadyK commented 6 years ago

@FejZa @eirikhollis Hi guys, We have a question, please: "It contains the full MRTK, except the SharingWithUNet part because that part has a specific implementation for SV" - does this mean that instead of SharingWithUNet part of MRTK it still has UNet-implementation of sharing, but just the one from the latest MRCK? Versus the older server-based sharing when you need server component running on PC. So the same SV build for the HoloLens will still work just in sharing mode with 2/more goggles with no PC required, right? Thanks.

eirikhollis commented 6 years ago

@GennadyK It contains MRTK release for 2017.2 (not the latest patches though, FejZa?) and latest MRCK implementation of SharingWithUNet. It is not server-based, but to use SpectatorView, you need to connect it with a computer and initialize the editor as the UNet host. (Which is what is changed in MRCK versus MRTK, plus some other things).

eirikhollis commented 6 years ago

So to answer your question. Yes you can still create a host/client relationship between two hololenses without a computer with the MRCP code, but you cannot have SpectatorView without a computer.

GennadyK commented 6 years ago

Thank you eirikhollis, this exactly what we need to hear :) As we are building a demo app for all 3 scenarios: