The layout of a HoloLens project

The most basic Unity project is made up of at least one scene. Any new scene will contain a directional light and main camera. The HoloLens uses this camera as the user's point of view, so we will need to make a few changes to the default starting scene to suit our needs.

Here, we will set up our main camera, so our program will work correctly with HoloLens:

  1. Select the object in the Hierarchy view named Main Camera.
  2. Look at the right side of the screen in the Inspector view.
  3. In the Camera component, click on the Clear Flags and select Skybox drop-down menu, as follows:
  1. Select Solid Color.
  1. Ensuring that Main Camera is still selected, click on the Background color box (which is currently a deep blue); this will bring up the Color Picker dialog box:
  1. In the numeric input fields, change the numbers to R=0, G= 0, B=0, and A= 0 and close the color picker. With the HoloLens a black color with 0 Alpha transparency is needed for a perfectly transparent 3D background.

The HoloLens uses the background color to determine its transparency. Black is completely transparent. If you use black on objects throughout your project, you will run into problems with see-through objects. Also, using colors other than black for the background can block the users' view of the world, which can be extremely disorienting and dangerous for the user.

  1. Next, look for the Clipping Planes option and its input field labeled Near. Here, we will need to change the default 0.3 to the recommended 0.85. Due to the nature of HoloLens, anything closer than 0.85 meters causes the user to cross their eyes and, it can be disorienting.
  1. With the Main Camera still selected, look at the Transform component. The first option in that box is labeled Position. You will notice X, Y, and Z input fields; change the Z element from its default of -10 to 0.
..................Content has been hidden....................

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