Skip to content

Prefabs

In Unity, it's typical for an asset package to come with a prefab the user can drag into their scene to get started quickly and easily. The HoloPlay SDK follows that model and offers the HoloPlay Capture prefab as the primary tool. There may be additional prefabs added as the SDK is developed that offer extended functionality.

This section will outline the prefabs as well as their individual components and their parameters.


HoloPlay Capture

Provides a framing volume for multi-view capture. This is the SDK's primary tool and replaces the default Unity camera as the game object responsible for rendering. Has one child object, the HoloPlay Camera, which is manipulated during the rendering process by the Capture and Quilt components.

Capture.cs

This component defines how the HoloPlay Camera is manipulated to accomplish multi-view rendering.

Size (float)

The size of the capture volume, measured vertically from the center, similar to a typical orthographic camera in Unity.

Near and Far Clip Factor (float)

The near and far clipping planes of the volume are defined in terms of the size of the capture. If the near clip factor is set to 1, for example, the near clipping plane will sit size units back from the focal plane. If the far clip factor is set to 2, the far clipping plane will sit 2 * size units in front of the focal plane.

Orthographic (bool)

The HoloPlay Capture uses a perspective camera with a small FOV to approximate physical accuracy. Using an orthographic camera will diminish that physical accuracy. We suggest not setting this to true, but it is an option.

Default: false

FOV (float)

This changes the FOV of the HoloPlay Camera.

Default: 13.5

Custom Vertical Angle (float)

How much to skew the frustum vertically.

Default: 0

Custom View Cone (float)

How far (in degrees) the HoloPlay Camera sweeps around the content it's capturing. This can be modified to exaggerate or diminish the view cone.

Default: 40

Quilt.cs

The Quilt component handles processing the views into a light field image. It defines the number and size of the views, and makes calls to render through the Capture component in OnRenderImage(). The resulting quilt texture is then blit to the screen through the lenticular shader, producing the 3D image.

Quilt RT (RenderTexture)

The RenderTexture that all the views are copied to. Each view is first rendered to a temporary RenderTexture, so post-processing effects can be applied individually if there are any. It is then copied to the Quilt RT. The Quilt RT is automatically generated and cannot be changed, but it is exposed in the inspector and can be previewed by double-clicking.

Captures (Capture[])

The array of Captures this Quilt is rendering from. By default this consists of a single capture (the one on the game object), but additional captures can be added. They render in order from first to last, on top of each other (as long as the background color has an alpha of 0).

Add capture
Will add a capture to the array of captures.

Remove capture
Will remove the last capture in the array of captures.

Override Quilt (Texture)

If you have a pre-made quilt texture, set the Override Quilt to that texture to render it as a light field image. If this is set, the Quilt component will not do any rendering from the captures and will instead only process the Override Quilt.

Render Override Behind (bool)

If this is set to true, the Override Quilt will be used as a backdrop, and the Captures will render on top of it.

Debug Printout Key (KeyCode)

In play mode, will bring up a IMGUI window displaying which version of the HoloPlay SDK is being used and where calibration was read from.

Default: F8

Screenshot 2D Key (KeyCode)

In play mode, will take a 2D screenshot of the main view.

Default: F9.

Screenshot 3D Key (KeyCode)

In play mode, will take a screenshot of all views at once and save as a quilt image.

Default: F10

Force Config Resolution (Bool)

It's recommended to leave this set to true unless there is a very specific reason for disabling it.

Whether to force the built application to switch to the Looking Glass's resolution as read in from the calibration. If this is set to false, and the user chooses the wrong resolution, the 3D image will be garbled.

Default: true

Tiling (struct)

Default means that the Quilt Settings will automatically be chosen based on the Quality Settings. This can be overridden and forced into a particular preset, or set to custom and set manually.

Default: Default

OnQuiltSetup() (UnityEvent)

Event called in OnEnable after calibration is loaded, screen is setup, material is created, and calibration is sent to shader.

Render In 2D (bool)

Allows you to preview your content in 2D instead of 3D.

Preview

One of the most useful features of the HoloPlay SDK is the ability to preview your work live in the Looking Glass as you edit. Unity does not support an easy way to create a fullscreen pixel-perfect game window, so we developed our own system for creating one. It requires the user to set the window position themselves, so there is a small GUI to help with that.

Toggle Preview
Will open / close the preview window.

Settings
Will open the preview settings GUI to allow for positioning and toggling of preview windows.

Reload Config

Will reload the calibration. Useful if you plug in a Looking Glass after starting Unity, and the calibration needs to be reloaded.

Optimization Settings

Opens the optimization settings dialogue. This is opened by default when the HoloPlay SDK is imported, and is usually never needed again after that.


HoloPlay UI Camera

The HoloPlay UI Camera can be used if you want 3D content on the Looking Glass, but 2D content on your regular display. Typically, intricate UI elements like text and menus will be difficult to display in the Looking Glass. The option here is that you can leverage 2D screens for what they do best, and put the 3D content unencumbered on the Looking Glass.