Can't see custom holograms in Shared Experience

Hello all, I am trying to figure out how to create a shared experience with my custom holograms (not the ones used by microsoft). On manipulation gesture, either player can create a hologram but for whatever reason the other user can't see it. I am using a lot of the files from Hololens Academy 240 and all those can be seen by both hololens users. Is there a special line of code that makes holograms visible to everyone?

Comments

  • james_ashleyjames_ashley ✭✭✭✭

    @jackson7,

    It's actually a lot more manual than you'd think. Look in the CustomMessages class to see how sharing service is used to send info back and forth between devices. You'll still have to handle what your messages mean and what to do when they are received, though. This article provides some overview of what's actually happening: https://blogs.windows.com/buildingapps/2017/04/18/building-telepresence-app-hololens-kinect/

    James

    James Ashley
    VS 2017 v5.3.3, Unity 2017.3.0f3, MRTK 2017.1.2, W10 17063
    Microsoft MVP, Freelance HoloLens/MR Developer
    www.imaginativeuniversal.com

  • @jackson7 said:
    Hello all, I am trying to figure out how to create a shared experience with my custom holograms (not the ones used by microsoft). On manipulation gesture, either player can create a hologram but for whatever reason the other user can't see it. I am using a lot of the files from Hololens Academy 240 and all those can be seen by both hololens users. Is there a special line of code that makes holograms visible to everyone?

    I've made a shared experience too. But I used the UNET for all the sharing. Did you check Hololens Academy 250? It doesn't need a separate server now. One of the hololenses can be the host and you don't need the CustomMessages class, you can let the unity engine do the hard stuff for you.

  • What version of Unity did you use for the UNET?

  • I've done the UNET example in the Holotoolkit.Examples using Unity 2017.1 doing something similar to what you are talking about. All you need to do is send a Network.Spawn(objectToSpawn). Look in the PlayerController script.

    AR Developer

  • hi dbarret or c1nder, my Unity 2017.1.1f1 is telling me that XR does not exist in the namespace. It recognizes VR namespace but not the new XR.

    I've downloaded the files multiple times and reinstalled the Unity editor multiple times and only the new Unity Beta works, but the beta doesn't have the Windows Store App.

    Any suggestions?

  • dbarrettdbarrett ✭✭✭
    edited October 2017

    Are you downloading from the actual Microsoft tutorial page or the GitHub page? The tutorial is only good for the Beta as of now. The GitHub is geared for the latest release but, obviously doesn't include the 250 project. But it contains another similar to it in the Holotoolkit.Examples folder.

    However, with the release of Windows XR on October 17th I'd assume Unity will release their 2017.2 not too far along after that.

    AR Developer

  • I'm not getting any immediate errors which is a nice change. For building the other example in the Holotoolkit/examples folder, is it any different from the Hololens 240 build process?

  • c1nderc1nder
    edited October 2017

    @jackson7 said:
    I'm not getting any immediate errors which is a nice change. For building the other example in the Holotoolkit/examples folder, is it any different from the Hololens 240 build process?

    @dbarrett : So it was you that did that example! Good stuff. Got me going when I first started

    @jackson7 : I tested the 250 with 2017.2 beta. The bullet example is quite good too. It has all the basics to get you started unlike the 250 example where it has a lot of code specific to the scenario they are building. Well, Unity 2017.1.2 was just released. Might as well get that. Get the corresponding Holotoolkit (HTK) from

    https://github.com/Microsoft/MixedRealityToolkit-Unity/releases/tag/v1.2017.1.2

    along with the examples. Import them into your project. Apply the build settings from the easy to access menu in unity : HoloToolkit-->Configure--> Apply project setting + Capability Settings. You need to tick all the 3 client/server capabilities at the bottom in addition to the normal stuff.

    Open the SharingWithUnetExample scene. Add it to the build settings dialog. And you're done. You need vs2017 with the UWP, unity and game dev pkgs installed to compile.

    Mind you, that you should have the host HoloLens started first and give it about 1min to export the anchor. Then start the other HoloLens(client). It should connect to the host automatically if your router is not blocking UDP. I just use a router that has everything open. Give the client HoloLens about a minute to import the anchor and your should be done!

    When you air tap, you will see a bullet that will be shared between both Hololenses.

  • @c1nder I did not actually make that example I just did something very similar to it. Sorry for the confusion. It is a really good example though.

    AR Developer

  • For the second hololens to connect do I start without debugging in visual studio in the same way I do for the first Hololens?



  • Also I wanted to make sure that these things were set to the right settings. I haven't had an anchor appear when the first Hololens is deployed.

  • dbarrettdbarrett ✭✭✭
    edited October 2017

    I don't believe you need sharing services because it is not part of Unet. You need Internet Client permission.

    If you are on a secure network it will not work either. Jump on an open network like a mobile hotspot or a router without security, it doesn't even have to have internet as long as the two HoloLens are on the same network.

    There is also a bug in this project that has yet to be resolved. Sometimes the HoloLens will not anchor or never anchor and you have to restart the HoloLens completely.

    More than likely it is the Network that you are on though.

    AR Developer

  • It doesn't let you set the "Internet Client" capability with "Private Network Client" set. You only need that anyway if you're accessing the internet. Still works though. I agree. You don't need "sharing services". Does the anchor get exported on the host HoloLens? You can check by putting a breakpoint at UNetAnchorManager.ExportComplete. You can check the Import on the client HoloLens at UNetAnchorManager.NetworkTransmitter_dataReadyEvent. I've had this intermittent bug where one of the HoloLenses would not accept UDP packets. Worked once I restarted the device.

  • It seems to have been solved once I got on a different network. Also for those who are reading this, I was able to answer my other question. You do need to deploy to both hololens's in Visual studio. The second once will join once it's deployed.

  • Hello all,
    I have been able to have interaction between the two hololens's with the Bullet example. However, when I try to create my own prefabs that both hololens's will be able to see, I am unable to. Besides having the Network Identity and Network Transform attached to the objects, what else do I need to do?

    Also as a side note, I cannot find where they instantiate the bullets or the red boxes above the hololens's.

  • Go through this unity tutorial first. It spawns a bullet too. Covers all the concepts around unet.
    https://unity3d.com/learn/tutorials/topics/multiplayer-networking/introduction-simple-multiplayer-example?playlist=29690

    You basically need to add it to the network manager. But please have a run through the tutorial first.

Sign In or Register to comment.