Received Feedback on my HoloLens Videos and Posts

So I received some feedback on the HoloLens. Watch the video to get all the juicy details. If you don’t have time to watch, that’s cool. It boils down to a little rant around the field of view bit I keep getting asked about followed by me talking about how Andy, from the HoloLens team, emailed me to ask for the source code of the little music visualizer app I created and deployed to the HoloLens.

It seems my video showing how to deploy an Unity app to the HoloLens was passed around the team with the title of

“Any guesses about why this deployed app is the worst thing ever?”

When I first saw that, I was taken back a little but that feeling quickly faded when I read the next sentence:

“Basically, that app should run great and we want to know why it isn’t.

There is a huge amount of speculation going on in the thread, and basically we just want to see the source. Can you bundle it up and mail it to me?”

Of course, I bundled up the app to the whopping 600KB it weighed in as (minus the mp3s) and sent it to Andy. I felt bad that engineers at Microsoft was taking time to look at my little demo app that I threw together sometime last year. I was happy to see them reaching out to developers though to make sure that they are able to get their apps to run on the platform.

Shortly after sending the code I received a couple of tips. The first tip was that I should change any places I used “FixedUpdate” to simply “Update”.  I updated the code to take that into account. So far, that is the only update I made to the code and you can see a dramatic difference as the blocks are actually in sync with the music now.

I’m not sure why I was using FixedUpdate in the first place but it totally makes sense why that would be a problem. FixedUpdate can be beneficial when you want to make sure this code gets called a specific number of times a second – or every X milliseconds. This can be beneficial for handling physics.

However, most of the time you want your code to call Update, which gets called every frame. Receiving input, moving non-physics objects (like my visualizer cubes), AI and many other bits can all be updated this way inside of the Update method.

Update isn’t called on a regular time interval. If one call takes longer than another then the time between update calls be different. FixedUpdate, on the other hand, is called at a fixed time. The time between update calls are consistent. So if the fixed timestep is 0.02 it means that Unity is going to try real hard to make sure each FixedUpdate call happens 50 times per second regardless what the render frame rate is. If the game or app is running slower and the frame rate drops to say 25 fps, then it will try to run FixedUpdate twice to catch up – which will just drive the frame rate lower. At some point this cycle of badness just bottoms out. This was why my little app was not running correctly on the HoloLens.

I expect I’ll have more performance tips that comes from my adventures with the HoloLens. To stay informed you could subscribe to my YouTube channel. I have other ways to stay connected in the near future.

As always, feedback is welcome. 🙂 Leave me comment and let me know what you would like to see next with the HoloLens.

Side by Side HoloLens Recording Comparison (Streaming vs. On Device)

I created a video to show the results from putting the HoloLens to the test with un-optimized code and then record the two different ways (streaming and direct recording on the device).

sidebyside-hololens-visualizer

I show the app as it runs natively on a relatively beefy PC. The purpose is not to try and demonstrate the performance of the HoloLens. Instead, it is to see which recording method is the best on the HoloLens when it is already at its max capacity.

Watch the video here:

My conclusion is that recording directly on the HoloLens takes more of a toll than having the HoloLens stream what it sees to another PC. Now, chances are if my app was really network traffic heavy then it could be better to record directly on the device.

As with anything, your mileage may vary. Hopefully this was beneficial for you. Let me know what your thoughts are in the comments!

How to Deploy a Unity Game to the HoloLens Device – Step by Step

Make sure your computer meets the requirements and install the tools, which can be found here:

https://developer.microsoft.com/en-us/windows/holographic/install_the_tools

 

Video Tutorial:

 

1. Make sure your Unity game is set to be a Windows Store app in the Build Settings

 

image

2. Make sure the SDK is set to Universal 10. UWP Build Type can be either XAML or D3D. Build and Run on Local Machine. It is important to check the Unity C# Projects checkbox.

3. Click the Player Settings and under “Other Settings” check the Virtual Reality Supported Checkbox and then pull Windows Holographic from the dropdown. In order for this to be available, you must have downloaded all the right tools. (VS 2015 Update 2 or better, Unity 5.4.0b14-HTP or better)

 

image

4. Still in Player Settings, go to the “Publishing Settings” tab and then scroll down to the Capabilities section and select SpatialPerception.

5. Click Build from the Build settings dialog box. Select the output folder. I called mine “app”.

6. Browse to that folder and open the Visual Studio solution (.sln) file.

7. Change to Release if you want the best speed.

8. Change from ARM to x86. 

9. Change to Remote Machine.

10. Click the “Run” button to run on the Remote Machine. This still requires for the IP address to be setup. Check out my previous blog post if you have questions about that.

Leave me a comment and let me know if you have any problems or if this was helpful.

How to deploy an App to the HoloLens Device – Step by Step

Here is a step by step video I created to show how to deploy an app to the HoloLens.

Make sure your computer meets the requirements and install the tools, which can be found here:

https://developer.microsoft.com/en-us/windows/holographic/install_the_tools

 

If you’d prefer to have text instructions, you are in luck:

1. Make sure your HoloLens device is setup to be in Developer mode. This is under Settings.

2.You can deploy over WiFi by determining the IP address of your HoloLens. An easy way is to launch the Microsoft HoloLens app and see what it says the IP address is.

4. You can then select “Remote Machine” as the deployment target (instead of Local Machine). Make sure that the CPU is set to either Any CPU or x86 and not ARM.

5. When you Run the app, it will deploy it to the Remote Machine and you will see the app running in the HoloLens!

 

As an alternative to deploying over WiFi, you can just connect your HoloLens to your PC through the USB cable and then in Visual Studio select “Device” as your deployment target (instead of Local Machine).

 

You can see it is really easy to deploy an app.  Let me know in the comments if this was beneficial, or if you had issues deploying the application for some reason and I’ll try to help out.