Unity SDK Components

The Leia Unity SDK includes several essential components for developing lightfield content for LitByLeia™ devices, including the LeiaCamera and LeiaDisplay components.

LeiaCamera Component

The LeiaCamera component automatically creates a camera rig that allows you to render in multi-view on LitByLeia™ displays and control settings like depth and focus distance.

Baseline Scaling

Baseline scale controls the spacing between adjacent cameras in the LeiaCamera array. This spacing can be used to increase or decrease the depth.

Convergence Distance

The convergence distance sets the location of the multi-view convergence plane with respect to the camera plane.

LeiaDisplay Component

When you add a LeiaCamera component to a scene, a LeiaDisplay gameObject will also automatically be generated in the scene. The LeiaDisplay inspector is used to change rendering settings.

From the LeiaDisplay inspector, users can select an Editor Emulated Device to emulate in Unity:

Selecting an "Editor Emulated Device" only modifies how content is simulated in the Unity Editor; an apk or app built with the LeiaLoft Unity SDK will automatically render correctly on any LitByLeia™ device.

From the LeiaDisplay inspector of the scene's LeiaDisplay, users can also specify a LightfieldMode for the LeiaDisplay to start in. There are two supported LightfieldModes:

  • Off - No parallax. Conventional 2D screen experience

  • On - 3D effects enabled

During play mode in the Unity Editor, switching the LeiaDisplay's LightfieldMode gives a preview in the Unity Editor of how pixels will be rendered. However, the Lightfield effect will not be apparent without a LitByLeia™ display.

During edit mode in the Unity Editor (outside of play mode), the user can select a LightfieldMode to start the scene in, then save the scene. On a LitByLeia™ device the scene will start in the LightfieldMode that the LeiaDisplay saved.

Parallax Auto Rotation

If the user chooses to show their content in only portrait or only landscape orientation, the depth cues can rotate with the device even if the content's orientation is fixed.

For example, if you have your game set to landscape orientation only:

Parallax Auto Rotation : Off

Parallax Auto Rotation : On

Lines represent depth cues

This option will allow the depth cues to remain upright, creating a persistent 3D effect.

Anti Aliasing

Anti Aliasing provides MSAA rendering in our graphics pipeline. Following the Unity Recommended Settings Window in Project Setup, anti-aliasing should be disabled in Quality Settings.

Switch to 2D mode on scene change

Detects if game is switching to a scene not containing a LeiaDisplay and switches the backlight to 2D.

Render Technique

There are two render techniques you can choose from the Leia Display component: Default and Stereo

Default

The default rendering technique will render using the native view count of the display. So on 4 view devices such as the Hydrogen or Lumepad, 4 views will be rendered.

Stereo

The stereo rendering technique renders only two views, one for the left eye and one for the right eye. Because Hydrogen and LumePad have 4 views, the left two views will both show the left view, and the right two views will both show the right view.