HoloLens Development Notes-Unity's camera chapter

Source: Internet
Author: User

When you wear the HoloLens, you will be at the center of the holographic world of application. When your project opens the "Virtual Reality support" option and "Windows holographic" is selected, Unity's camera components are automatically rendered in stereo, will automatically follow you and move or rotate.

However, to ensure the holographic experience, the following options require you to manually set all the cameras:

    • Mixed reality rendering Mixed Reality Rendering
    • Camera positioning positioning the camera
    • Frustum Range Adjustment Clip Planes

Note: These settings need to be applied to each camera in each scene.

By default, when you create a new scene in unity, a master camera is automatically generated, and you need to apply the above settings to it.

Mixed reality rendering Mixed Reality Rendering

As described in the previous sections, HoloLens does not obscure any real content, but it renders everything black as transparent content. So we need to apply the same settings to our main camera and set the background of the main camera to pure black to ensure that the real world content is displayed.

    1. Open Camera Viewer and enter camera component settings
    2. Set clear flags to solid color (solid color)
    3. Set the Backgroud color value to Rgba (0,0,0,0)

Camera positioning positioning the camera

If you use the World Origin (x:0,y:0,z:0) to decorate your scene, this is a simple matter. So we're going to reset the camera's initial position to the world origin, from the default value (0,0,-10) to (0,0,0). This position represents the initial position of the HoloLens in the world and the initial position of the user's head in the world.

Frustum Range Adjustment Clip planes

Considering the natural vision of the human race, we should change the near value of the frustum from the default of 0.3 to 0.85. Note: In HoloLens, one unit of unity represents one meter.

Multi-camera multiple cameras

When there are multiple cameras in the scene, Unity uses the Maincamera tag to determine which camera to use for stereoscopic world rendering.

HoloLens Development Notes-Unity's camera chapter

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.