Holoplay.cs
This script drives the Holoplay Capture prefab.

Fields

Holoplay.Instance

Type: Holoplay
The most recently enabled Holoplay in the scene. Given that in most cases there will be only one Holoplay component, this field is a quick way to get a reference to that.

Holoplay.CameraData.Size

Type: float
Distance in Unity units from center of the Holoplay component to the top of the Holoplay component. As in, a size of 7 will make a Holoplay component whose total height at the zero-parallax plane is 14.

Holoplay.TargetDisplay

Type: int
(v1.2 or later)
Makes the Holoplay component render to a specified display. This is automatically managed in most cases, including when working with ExtendedUI, Multiplex, a Pro Workstation Manager, or a conventional setup.

Holoplay.Preview2D

Type: bool
Allows you to preview your content in 2D instead of 3D. This can be useful for debugging.

Holoplay.CameraData.FieldOfView

Type: float
Sets fov of camera like normal, but this ends up changing how far the camera is from center (GetCamDistance() will return larger values for smaller FOVs)

Holoplay.CameraData.NearClipFactor

Type: float
Sets the near clipping plane for the camera as measured from the center of the Holoplay GameObject, multiplied by scale.
For example, a Holoplay with a nearClipFactor of 1.5 and a size of 10 means that the camera will set the near clipping plane to be 15 units in front of the Holoplay's location.

Holoplay.CameraData.FarClipFactor

Type: float
Sets the far clipping plane for the camera as measured from the center of the Holoplay GameObject, multiplied by scale.
For example, a Holoplay with a farClipFactor of 1.5 and a size of 10 means that the camera will set the far clipping plane to be 15 units in behind of the Holoplay's location.

Holoplay.CameraData.ScaleFollowsSize

Type: bool
If set to true, the scale of the Game Object's transform is set to the size of this Holoplay.

Holoplay.QuiltPreset

Type: Quilt.Preset
The quilt configuration you'd like to choose. Quilts are the underlying textures that drive Looking Glass. Higher quality quilts lead to better visual fidelity, but are more graphics intensive.
Note: This is a private variable starting v1.2. To modify via script, use SetQuiltPreset() and GetQuiltPreset() instead.

Holoplay.Screenshot2DKey

Type: KeyCode
Which key will take a 2d screenshot. This screenshot will save to the root directory of your project.

Holoplay.ScreenshotQuiltKey

Type: KeyCode
Which key will take a 3D screenshot in the form of a quilt. This quilt will save to the root directory of your project.

Holoplay.OverrideQuilt

Type: Texture2D
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.

Holoplay.RenderOverrideBehind

Type: 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.

Holoplay.QuiltTexture

Type: RenderTexture
The live quilt that this Holoplay is producing.

Holoplay.Gizmos.FrustumColor

Type: Color
Color of frustum (Holoplay's capture boundaries) gizmo in the Scene editor

Holoplay.Gizmos.MiddlePlaneColor

Type: Color
Color of Zero-Parallax-Plane identifier gizmo in the Scene editor

Holoplay.Gizmos.HandleColor

Type: Color
Color of gizmo handles in the Scene editor

Holoplay.Gizmos.DrawHandles

Type: bool
Whether or not to display handles, which allow the user to manipulate the Holoplay's shape with their mouse in the Scene editor

Holoplay.Events.OnHoloplayReady

Type: LoadEvent
Functions associated with this event will fire just after the Holoplay is ready, which involves reading calibration and accounting for screen size adjustments.

Holoplay.Events.OnViewRender

Type: ViewRenderEvent
Functions associated with this event will fire before each individual view is rendered as well as one last time before the entire quilt is rendered.

Holoplay.Optimization.viewInterpolation

Type: ViewInterpolationType
(v1.2 or later)
Instead of rendering all views (controllable by quiltPreset setting), view interpolation options allow you to render only a subset of views, relying on a depthmap-based view interpolation to fill in other views. This significantly enhances performance, though depending on what is in the scene, it may result in visual noise.

Holoplay.Optimization.ReduceFlicker

Type: bool
(v1.2 or later)
View interpolation sometimes result in a visual artifact where pixels flicker between different color values. This setting reduceFlicker to true helps mitigate that. Apply only when needed as it significantly reduces performance.

Holoplay.Optimization.FillGaps

Type: bool
(v1.2 or later)
View interpolation sometimes result in a visual artifact surfaces have missing pixels, or gaps. Setting fillGaps to true helps mitigate that. Apply only when needed as it reduces performance.

Holoplay.Optimization.BlendViews

Type: bool
(v1.2 or later)
View interpolation sometimes results in stark and unblended color differences on surfaces of objects. Setting blendViews to true helps mitigate that. blendViews increases the amount of flicker, so it may be wise to use this with reduceFlicker.

Holoplay.Debugging.ShowAllObjects

Type: bool
When set to true, this reveals all hidden objects used by this Holoplay component, such as the cameras used for rendering.

Holoplay.QuiltSettings

Type: Quilt.Settings
Used to get the settings of the connected device.

Holoplay.CameraDistance

Type: float
Returns the camera's distance from the center. Will be a positive number.

Holoplay.LightfieldMaterial

Type: Material
The material with the lightfield shader, used in the final graphics blit to the screen. It accepts the quilt texture as its main texture.

Holoplay.CameraData.RenderingPath

Type: RenderingPath
The rendering path to use for rendering each of the single-views. You may choose to use the player settings, or explicitly use deferred or forward rendering.

Holoplay.CameraData.UseOcclusionCulling

Type: bool
When true, enables occlusion culling.

Holoplay.CameraData.AllowHDR

Type: bool
When true, enables high dynamic range.

Holoplay.CameraData.AllowMSAA

Type: bool
When true, enables Multisample anti-aliasing.

Holoplay.CameraData.AllowDynamicResolution

Type: bool
When true, enables dynamic resolution.

Holoplay.CameraData.ViewconeModifier

Type: float
Represents how 3-dimensional the final screen image on the LKG device will appear, as a percentage in the range of [0, 1]. The default value is 1.

Holoplay.CameraData.CenterOffset

Type: float
Offsets the cycle of horizontal views based on the observer's viewing angle, represented as a percentage on a scale of [-0.5, 0.5].

Functions

ResetCamera()

Returns: float
Applies the Holoplay attributes to the internal Holoplay camera. Holoplay calls this every frame, so you won't need to unless you're doing advanced things with timing.

ReloadCalibration()

Returns: void
Occasionally Holoplay.cs will lose track of the Looking Glass' calibration. If this happens, press the "Reload Calibration" button to refresh.

GetCamDistance()

Returns: float
Returns the camera's distance from the center. This will be a positive number.

SetQuiltPreset(Quilt.Preset preset)

Returns: void
(v1.2 or later)
Changes quiltPreset via script

GetQuiltPreset()

Returns: Quilt.Preset
(v1.2 or later)
Retrieves quiltPreset​