You are here:   Blog
Register   |  Login

Capture A Real Room For The HoloLens Emulator

Apr 17

Written by:
4/17/2016 2:55 PM  RssIcon

image

You may have the need to load a specific room in the HoloLens Emulator, for example to use with the Holograms 240: Sharing holograms tutorial.

Capture The Room

For this step you will need a HoloLens (or a friend who has one).

Turn on your HoloLens and map the room (playing a game of Young Conker helps with this).

Next, connect to the HoloLens with the Device Portal (see: Using the Windows Device Portal for instructions).

image

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

This will allow you to see the mesh for the room.

image

Next, click on the Simulation tab,  give the room a name, and click the Capture button.

image

Save the room.

Load The Room Into Emulator

image

To demonstrate loading the room into the emulator, we start with the code from the tutorial: HoloLens Hello World!.

However, any existing or new HoloLens project will work.

image

We open Unity and click Open.

image

We select the root folder and click Select Folder.

image

The project will load.

image

We select File then Build Settings…

image

We build the project.

image

We build the project to the App folder.

image

After the project builds, we open the .sln file (in the App folder) with Visual Studio.

image

We set it to Release, x86, and select the HoloLens Emulator.

image

Now, select Debug, then Start Without Debugging.

image

The HoloLens Emulator will start.

If you have never used the HoloLens Emulator before, read Using the HoloLens emulator and Advanced emulator input for directions on how you use the mouse to move the gaze target to what you want to select, then selecting it, (rather than trying to simply click on something by pointing to it with the mouse, which doesn’t work).

image

After the application loads, open the Additional Tools pane.

image

When the Additional Tools pane opens, select the Room tab then click the Load Room button.

image

Select the .xef file that you previously downloaded and click Open.

image

The Room will now be loaded.

Click the X in the upper right-hand corner of the Additional Tools pane to close it.

image

Back in the Emulator, open the Windows Device Portal.

image

When the Windows Device Portal opens, select the 3D View tab and click the Update button.

This will allow you to see the mesh for the room.

image

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.

Links

Using the Windows Device Portal

Spatial mapping in Unity

Rendering the Spatial Mapping Mesh

Download

You can download the code for the HoloLens Hello World! tutorial from the Download page.


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