Quick Start - Microsoft Hololens

This tutorial covers the basic AR setup with Microsoft Hololens.

We continue where we left off in Getting Started.

AR Settings 

Select “Views > Project Settings”, which opens the “Project Settings” view on the right side of the window:

Quick Start - Microsoft Hololens

Open the “AR” panel, and for “framework” select “webxr”.

Under “rendering” set the clear color “alpha” (A:) value to 0 to ensure the background is transparent:

Quick Start - Microsoft Hololens

Viewing on the Hololens 

As of point of writing, Microsoft Edge on the Hololens does not support port forwarding.

Instead we have to set up a domain to resolve to the desktop that Wonderland Editor is running on. As a second step, we need to enable SSL on that domain, which WebXR Device API requires on non-localhost domains.

We only provide rough guidance here, but the process will look as follows:

Acquire a domain 

Get a cheap domain. The shorter, the easier it will be to type into the Hololens.

Configure this domain to point to the external IP address of your desktop. Make sure that your router is configured to forward a port of your choice (e.g. 8080) to this domain.

Retrieve an SSL certificate 

For a free option, use Let’s Encrypt to retrieve SSL certificates for your domain.

Let’s Encrypt uses the “ACME protocol” to verify you actually control the machine that the domain is pointing to. This means you will need to run a ACME client (e.g. Certbot) once when retrieving the certificates, and when refreshing them.

Through the ACME client, you will retrieve the certificate files: .crt, .key and optional .pem.

Set certificate in Wonderland Editor 

Open “Views > Preferences” to open the Preferences view, which contains cross-project settings for your Wonderland Editor installation.

Here you can enable SSL in the “Server” tab and set at least the “SSL certificate file” and “SSL key file”.

Quick Start - Microsoft Hololens

After stopping and starting the server by clicking on “localhost:8080” at the top of the editor window, you should now be able to view the AR project from the Microsoft Hololens by accessing your domain.

Soft Reloading 

To allow page reloads without leaving the AR session on the Microsoft Hololens, you can enable “soft reloading”, which will only reload the contents of the Wonderland Engine scene.

To enable soft reloading, disable “Force full page reloads” in “Views > Preferences > Startup”:

Quick Start - Microsoft Hololens