HMD Sample

All device extension samples have been unified in the latest version. There is not any code in the sample to keep it simple. All features are configured in the scene. You need to learn basic feature usages from handheld samples, and there is no difference when using them on the device.

The sample is named Combination_BasedOn_*, for example, the sample for Pico is Combination_BasedOn_Pico. This sample show most EasyAR features in one scene, they can be switched on or off in runtime, they can be used together or one by one.

Please reference Motion Tracking and EasyAR Features, EasyAR HMD Support.

Import Samples

Samples for devices that are built-in supported are located in the Unity Plugin package. Suggest to import the sample you need separately,

../_images/image_h1_3.png

You can also find them in the HeadMountedDisplay folder after all samples are imported if desired,

../_images/image_h1_5.png

Samples for devices that are supported by extensions are distributed within the extension package (not inside Mega Studio if using Mega). You can import samples into your project using Unity’s Package Manager window.

Use Pico as an example,

../_images/image_h1_4.png

Build and Run

Please reference,

Mega Configurations

If you are using EasyAR Mega, you need to follow How to use Mega Unity Samples.

If you are not using EasyAR Mega, make sure to disable the Mega Tracker object under ARSession, there will be errors otherwise.

../_images/image_h1_2.png

How to Use

../_images/image_h1_1.png
Mark 1: Switch UI display mode. Initially the UI will keep unmoved in the physical world, when HUD is on the UI will keep displaying before eye.
Mark 2: Switch EIF recording on/off. You must turn it off after on to record a usable EIF file, otherwise the file would not be usable.
Mark 3: Switch planar image tracking on/off.
Mark 4: Switch planar image motion fusion on/off.
Mark 5: Switch dense spatial map on/off.
Mark 6: Switch sparse spatial map on/off.
Mark 7: Switch Mega on/off.

How It Works

Function switchs

All features are off when start. This is done by disable the corresponding script (not GameObject). The button will change enabled value of the scripts.

VIO reference

There is a cube of size 0.25*0.25*0.25 at VIO origin in the sample. It is used for VIO reference. This cube is helpful for problem breaking down. For example, when using Mega, some fast drift is caused by VIO (in another word, the defect of the device), and the cube will move in the same way. You can also know VIO accuracy visually with this cube.

About image tracking

The sample has preset image scle. You need to print namecard.jpg to A4 paper, and make sure the image fit width to the paper. Sometimes the view point of eyewear does not reflect the camera image size. Try move the eyewear closer to the image if the image cannot be recognized. For general use, it is suggested to track lager images, like a 5m*5m image.

If EasyAR Motion Fusion is turned on, the image cannot move. And if it is turned off, you will lose the ability to track the image when it is out of the scope. Please be noticed, wehther EasyAR Motion Fusion is on or off, the image target scale must be set to physical size in real-world when using HMD. Otherwise the display position will be wrong.

About Mega

You need to apply for trail fist. You can only use EasyAR Mega after your apply approved.

You need to follow How to use Mega Unity Samples. But before you read this document, make sure to read Getting Started of Mega first.

About Sample Creation

You can reference Finish The Package: Sample to know how the sample was created. But please notice that article is not written for app developers but for hardware venders.