{"id":5895,"date":"2017-01-24T20:11:06","date_gmt":"2017-01-24T20:11:06","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/premier_developer\/?p=5895"},"modified":"2019-02-26T10:40:21","modified_gmt":"2019-02-26T17:40:21","slug":"hololens-how-to-create-mixed-reality","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/premier-developer\/hololens-how-to-create-mixed-reality\/","title":{"rendered":"HoloLens &#8211; How to Create Mixed Reality?"},"content":{"rendered":"<p><em><strong><a href=\"https:\/\/www.linkedin.com\/in\/rickmcguire7\">Rick McGuire<\/a>, Senior ADM<\/strong>, provides an introduction to mixed reality development with a test drive using HoloLens, Unity, and Visual Studio 2015.<\/em><\/p>\n<hr \/>\n<p>With the invention of HoloLens, it is now possible to superimpose a virtual 3D world onto our exiting reality. HoloLens lets you create holograms, virtual objects that appear in the in the same space as our real world, and they seem like real objects!<\/p>\n<p>I am admittedly a geek and love Sci-fi, I always thought the idea of superimposing graphics\/objects in our real-world space was intriguing. I believe that HoloLens is the first step towards making this a common occurrence. Imagine the possibilities, all the applications that could be developed with mixed reality (MR). The amazing thing is, the tools for creating MR are readily available today!<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-35428\" src=\"http:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2017\/01\/holo1.jpg\" alt=\"\" width=\"640\" height=\"360\" srcset=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2017\/01\/holo1.jpg 640w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2017\/01\/holo1-300x169.jpg 300w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>To start with, what exactly is mixed reality?<\/p>\n<p>\u201c<i>Mixed reality (MR), sometimes referred to as hybrid reality, is the merging of real and virtual worlds to produce new environments and visualizations where physical and digital objects co-exist and interact in real time.<\/i>\u201d \u2013 Wikipedia<\/p>\n<p>I recently spent some time learning Unity and experimenting with the HoloLens emulator. For my first project, I decided to download Unity and followed the video tutorial to develop the Roll-a-ball game. This tutorial integrates a handful of C# scripts, so you get an idea how to leverage Unity capabilities with Visual Studio and .NET. I highly recommend that you walk through this tutorial and develop and run the Roll-a-ball application. This is a great way to jump in and start learning key features of the environment including, Scenes, Scripting, Camera, lighting, etc.<\/p>\n<p>The Roll-a-ball tutorial is located <a href=\"https:\/\/unity3d.com\/learn\/tutorials\/projects\/roll-ball-tutorial\">here<\/a>. If you want to learn Unity this is a good place to start. If you prefer to just jump in and run an application on the HoloLens emulator, then read on to create the \u201cHolo\u201d World application.<\/p>\n<p>Unity Screen Shot \u2013 Roll-a-ball tutorial:<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-35430\" src=\"http:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2017\/01\/unity1.png\" alt=\"\" width=\"1282\" height=\"742\" srcset=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2017\/01\/unity1.png 1282w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2017\/01\/unity1-300x174.png 300w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2017\/01\/unity1-768x445.png 768w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2017\/01\/unity1-1024x593.png 1024w\" sizes=\"(max-width: 1282px) 100vw, 1282px\" \/><\/p>\n<p>HoloLens provides a rich API and set of tools which allows you to build applications on Windows 10 using Visual Studio 2015 or later, Unity 5.5 or later, along with the HoloLens emulator that runs on Hyper-V. You can also purchase the HoloLens developer kit that includes a HoloLens device <a href=\"https:\/\/www.microsoftstore.com\/store\/msusa\/en_US\/pdp\/productID.5061263800\">here<\/a>. To start with, I recommend reading the HoloLens Developer <a href=\"https:\/\/developer.microsoft.com\/en-us\/windows\/holographic\/documentation\">Documentation<\/a> to get an overview. You will need to ramp up on Gaze, Gestures, Spatial Mapping, <a href=\"https:\/\/unity3d.com\/learn\/tutorials\/topics\/physics\/raycasting\">Raycasting<\/a>, just to name a few. To get started, you can download and install all the tools <a href=\"https:\/\/developer.microsoft.com\/en-us\/windows\/holographic\/install_the_tools\">here<\/a>.<\/p>\n<p>At a minimum you need to Install Visual Studio 2015, the HoloLens Emulator, and Unity 5.5.<\/p>\n<p><b>Important:<\/b> Make sure you have the Windows 10 SDK installed, it is not installed with Visual Studio by default. You can run the Visual Studio installer to add the Windows 10 SDK. Go to Control Panel-&gt;Programs-&gt;Programs and Features then double click on Visual Studio 2015 to launch the setup. Select the Universal Windows App Development tools and install them.<\/p>\n<p>Visual Studio Setup:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/31\/2019\/04\/clip_image0067.jpg\"><img decoding=\"async\" style=\"padding-top: 0px;padding-left: 0px;padding-right: 0px;border: 0px\" title=\"clip_image006\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/31\/2019\/04\/clip_image006_thumb6.jpg\" alt=\"clip_image006\" width=\"342\" height=\"484\" border=\"0\" \/><\/a><\/p>\n<p>Installing and running Unity is fairly straight forward. If you have experience working with Unity I would recommend going right to the Holograms 101E tutorial which will walk through the basics of getting an app up and running on the HoloLens emulator. You should be able to get your first app up and running within an hour or so (depending on your internet connection for downloading).<\/p>\n<p>You will need Windows 10 Pro, Enterprise, or Education with a 64-bit CPU and 8 GB of RAM. The documentation indicates the emulator requires a CPU with 4 cores, I was able to run the emulator with no problems on my Surface Book i5 (2 cores\/4 Logical) with 8 GB of RAM. The full system requirements are listed on the tools link above.<\/p>\n<p><b>Important:<\/b> Building the Demo in Unity \u2013 you will need to download a separate file from Unity (not mentioned in the tutorial). In order to select the appropriate build setting you will need to download the Windows 10 (Metro) support <a href=\"http:\/\/download.unity3d.com\/download_unity\/38b4efef76f0\/TargetSupportInstaller\/UnitySetup-Metro-Support-for-Editor-5.5.0f3.exe?_ga=1.232454043.581747734.1483071220\">here<\/a>. This allows you to target your build for Universal Windows 10 store app.<\/p>\n<p>Unity Build Setting Screen shot:<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-35431\" src=\"http:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2017\/01\/unity2.png\" alt=\"\" width=\"1260\" height=\"1222\" srcset=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2017\/01\/unity2.png 1260w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2017\/01\/unity2-300x291.png 300w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2017\/01\/unity2-768x745.png 768w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2017\/01\/unity2-1024x993.png 1024w\" sizes=\"(max-width: 1260px) 100vw, 1260px\" \/><\/p>\n<p><b>Important:<\/b> You must enable developer mode for \u201csideloading\u201d apps. You can go to Setting-&gt;Updates and security-&gt;For developers, and select \u201cDeveloper mode\u201c (if you are allowed and are aware of the risks associated). I was required to choose this option to deploy my Origami app on the HoloLens emulator. If you don\u2019t do this, you will get a deployment error in Visual Studio.<\/p>\n<p>Windows 10 Settings screen shot:<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-35432\" src=\"http:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2017\/01\/win10dev.png\" alt=\"\" width=\"1652\" height=\"1320\" srcset=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2017\/01\/win10dev.png 1652w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2017\/01\/win10dev-300x240.png 300w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2017\/01\/win10dev-768x614.png 768w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2017\/01\/win10dev-1024x818.png 1024w\" sizes=\"(max-width: 1652px) 100vw, 1652px\" \/><\/p>\n<p>Once you have everything configured, you should be able to follow the <a href=\"https:\/\/developer.microsoft.com\/en-us\/windows\/holographic\/holograms_101e\">Holograms 101E tutorial<\/a> and have your first app running in the emulator rather quickly. I suggest using two screens, one for Unity\/Visual Studio and the other for the video tutorial.<\/p>\n<p>HoloLens emulator \u2013 launched Origami App with Visual Studio 2015:<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-35433\" src=\"http:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2017\/01\/orgami.png\" alt=\"\" width=\"1473\" height=\"933\" srcset=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2017\/01\/orgami.png 1473w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2017\/01\/orgami-300x190.png 300w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2017\/01\/orgami-768x486.png 768w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2017\/01\/orgami-1024x649.png 1024w\" sizes=\"(max-width: 1473px) 100vw, 1473px\" \/><\/p>\n<p>I hope this information helps get you started on your path to creating the next MR application for HoloLens. Perhaps \u201cFerengi Blast\u201d or \u201cAttack from Species 8472\u201d?<\/p>\n<hr \/>\n<p><a href=\"https:\/\/blogs.msdn.com\/b\/premier_developer\/archive\/2014\/09\/15\/welcome.aspx\"><strong>Premier Support for Developers<\/strong><\/a> provides strategic technology guidance, critical support coverage, and a range of essential services to help teams optimize development lifecycles and improve software quality.\u00a0 Contact your Application Development Manager (ADM) or <a href=\"https:\/\/blogs.msdn.microsoft.com\/premier_developer\/contact-us\/\">email us<\/a> to learn more about what we can do for you.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Rick McGuire, Senior ADM, provides an introduction to mixed reality development with a test drive using HoloLens, Unity, and Visual Studio 2015. With the invention of HoloLens, it is now possible to superimpose a virtual 3D world onto our exiting reality. HoloLens lets you create holograms, virtual objects that appear in the in the same [&hellip;]<\/p>\n","protected":false},"author":582,"featured_media":37840,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[73],"class_list":["post-5895","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-permierdev","tag-hololens"],"acf":[],"blog_post_summary":"<p>Rick McGuire, Senior ADM, provides an introduction to mixed reality development with a test drive using HoloLens, Unity, and Visual Studio 2015. With the invention of HoloLens, it is now possible to superimpose a virtual 3D world onto our exiting reality. HoloLens lets you create holograms, virtual objects that appear in the in the same [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/posts\/5895","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/users\/582"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/comments?post=5895"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/posts\/5895\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/media\/37840"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/media?parent=5895"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/categories?post=5895"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/tags?post=5895"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}