You are here:   Blog
Register   |  Login

Communicating Between a HoloLens and a Emulator

Apr 18

Written by:
4/18/2016 6:45 PM  RssIcon

image

One of the features that really makes the HoloLens special, is the ability to have multiple users interact at the same time. Developing applications to do this requires more than one HoloLens device. However, you can develop applications using a HoloLens and a HoloLens Emulator.

image

To demonstrate this, we start with the Holograms 240: Sharing holograms tutorial. Specifically the Chapter 4 – Discovery part where we can see an avatar of each user participating. You can create the tutorial yourself up to that point or download the code from the Download page on this site.

image

Open the application in Unity and select HoloToolkit from the toolbar, then Launch Sharing Service to launch the Sharing service that will allow the HoloLens and the Emulator to communicate with each other.

image

The Sharing service will start.

Deploy to the HoloLens

image

Start up your HoloLens and connect it to the same network that the Sharing service is connected to.

(See the HoloLens Hello World! tutorial for instructions on how to build a project in Unity and to open it in Visual Studio)

Now Deploy it to the HoloLens, rather than the Emulator, by selecting Release, x86, and Remote Machine.

image

Then select Debug then Start Without Debugging.

(note, sometimes the deploy fails and you have to try this step more than once).

image

You will see the HoloLens connect to the Sharing service.

image

You will be prompted to choose an avatar.

image

You will then be prompted to place the energy disk.

It will then open and animate.

Deploy to the Emulator

image

Return to Visual Studio and deploy to the Emulator by selecting Release, x86, and HoloLens Emulator.

image

Then select Debug then Start Without Debugging.

image

You will see that the Emulator connect to the Sharing service.

Note: If you do not see the Emulator connect to the Sharing service, the problem is usually an issue with the router you are using. See: Connecting The HoloLens Emulator To the Internet to resolve it.

image

The application will start in the Emulator. You will see the avatar selection screen.

Do not select an avatar yet…

Put HoloLens and Emulator in the Same Room

image

See the article: Capture A Real Room For The HoloLens Emulator for directions on capturing the room the HoloLens is in, and loading it into the Emulator.

Perform this step now.

image

Return to the Emulator and select an avatar.

image

In the Emulator, open the Device Portal.

image

In the Device Portal, select the 3D View tab, check the Show mesh box, and click the Update button.

You can return to the Emulator and move around the room. The gaze indicator will move around the room in real time as you move around in the Emulator.

Move around the room until you locate the energy disk animation. It will be in sync with the animation in the HoloLens.

image

When you look through the HoloLens you can see the avatar from the instance running in the Emulator.

If you move the avatar around in the Emulator, the avatar will move around when viewed through the HoloLens.

Links

Capture A Real Room For The HoloLens Emulator

Connecting The HoloLens Emulator To the Internet

Download

You can download the code from the Download page

2 comment(s) so far...


Gravatar

Re: Communicating Between a HoloLens and a Emulator

This helped me a lot to understand hologram sharing. Can you create a tutorial on how to share hologram with remote user's hololense( in different location)

By Mallik on   9/26/2016 10:38 PM
Gravatar

Re: Communicating Between a HoloLens and a Emulator

@Mallik - This article should provide an example of what you are looking for. All the users in all locations see the same holograms.

By Admin on   9/27/2016 5:01 AM

Your name:
Gravatar Preview
Your email:
(Optional) Email used only to show Gravatar.
Your website:
Title:
Comment:
Security Code
CAPTCHA image
Enter the code shown above in the box below
Add Comment   Cancel