Eyewear_DeviceHasNoTracking

Demonstrate eyewear support and how to use image tracking on eyewear.

You can adaptive AR eyewears without VIO capability referencing this sample. It use two camera rendering to display on eyewear, and the camera image display is off. Pre-calibrated ShadowCreator Action One and EPSON BT-350 can use this sample directly. Other eyewear needs to be calibrated before using.

We do not recommend use EasyAR on most recent eyewears. We require the device is VIO capable, then it can connect to EasyAR using custom camera way. Otherwise the AR ability will be quite limited and will not meet most recent AR experience. If you are device manufacturer, you can contact us through business channel.

Configurations

You need to add invision.display_mode settings in your AndroidManifest, this can also be done with enable invision.display_mode-vr.aar for Android platform.

../../_images/image_s16_5.png

Make sure to revert the change if you are running other samples on Android devices.

How to Use

../../_images/image_s16_4.png

How It Works

This sample is for an eyewear with no VIO feature.

When using eyewears like BT-350, you need to set CameraDeviceFrameSource.Camera to CameraRig in the scene. The CameraRig is just an empty node with two Camera children.

There is no need to render camera image, so turn off CameraImageRenderer.

../../_images/image_s16_1.png

Viewport of the two camera under CameraRig are adjusted to render left and right side of the screen.

../../_images/image_s16_2.png ../../_images/image_s16_3.png

Load pre-calibrated parameters into RenderCameraController.

parameterList[eyewearBT350].Add(Resources.Load<RenderCameraParameters>("Parameters/Epson BT350/LeftEye"));
parameterList[eyewearBT350].Add(Resources.Load<RenderCameraParameters>("Parameters/Epson BT350/RightEye"));

Update projection matrix each frame

Session.FrameUpdate += (_) =>
{
   LeftEye.projectionMatrix = parameterList[eyewearBT350][0].Projection(Session, LeftEye) * Matrix4x4.Rotate(Quaternion.Inverse(displayCompensation));
   RightEye.projectionMatrix = parameterList[eyewearBT350][1].Projection(Session, RightEye) * Matrix4x4.Rotate(Quaternion.Inverse(displayCompensation));
};

Session.FrameChange += (OutputFrame outputFrame, Quaternion displayCompensation) =>
{
   if (outputFrame == null) { return; }
   this.displayCompensation = displayCompensation;
};