Creating the scene

To get started, we'll create a new Unity project, import the toolkit, and then import the SolarSystem package with the prefab that we exported previously. Using MixedRealityToolkit provides some convenient shortcuts as prefabs and provided scripts:

  1. Create a new Unity 3D project, named SolarSystem-holo.
  2. Import the MixedRealityToolkit plugin for the Unity package (if you haven't downloaded it yet, you can find it at https://github.com/Microsoft/MixedRealityToolkit-Unity ).

 

  1. Conveniently, go to MixedReality | Configure | Apply HoloLens Scene Settings (or the mixed reality equivalents) and accept. This sets the camera settings for you.
  2. Save the scene and give it a name, such as solarsystem.
  3. Choose MixedReality | Configure | Apply HoloLens Project Settings and accept. This sets the build settings for you.
  4. Choose MixedReality | Configure | Apply HoloLens Capability Settings and accept. This sets the player settings for you.
  5. Reset the camera transform so its position is (0,0,0).
  6. Delete the default Directional Light option from the scene.
  7. In the Lighting window tab, delete Skybox Material and set Ambient Color to black.
  8. Lest we forget, in Build Settings, set Add Open Scenes as the build scene.
  9. Save the scene and the project.
Personally, for this project, I prefer to set the camera's near-clipping plane closer, such as 0.3, but I prefer to leave a little ambient light in the Lighting settings (for example, RGB 0.25, 0.25, or 0.25) so you can still see a bit of the far side of each planet.

You can test the scene on your HoloLens device by connecting it to Unity (open Window | Holographic and Connect) and pressing Play.

Then, deploy a test build to the device. Select Build, open in Visual Studio, set Release, x86, and Remote Machine (or emulator) and go to Debug | Start without Debugging.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset