With ASUS announcing the world’s first ZenFone AR with both Tango and Daydream capabilities at CES2017, Finally make AR/VR/MR these recent global development circle super hot words can let our domestic Android developers directly use the hands of Android Studio and convenient Android devices to carry out virtual development exploration!

Three kinds of interaction

AR

In augmented reality, the light received by human eyes includes the real light and the light emitted by the AR device screen, which is combined with the processing power of human eyes to enhance the sense of reality. The Phab 2 Pro is an AR device that can take pictures of cute cats or dogs playing with their babies without worrying about their safety because the animals are virtual.

VR

In virtual reality, use a headset or Cardboard to completely block the light from reality. The human eye only receives the light from the VR device and is completely isolated from reality. Oculus Rift, PlayStation VR, Samsung Gear VR and HTC Vive are all in this category.

先生

In mixed reality, THE MR device itself has the ability to sense three-dimensional coordinates, and the display of virtual objects changes as people move. Hololens belongs to MR devices.

Two major technology

Tango (Dragon Slaying)

Just as Sumsung added a camera to the Sch-V200 phone in 2000, which gave phones the ability to see the world with their eyes open, now Tango camera adds the ability to sense the real world in three dimensions.




  • Motion Tracking: Where am I, in space
  • Area Learning: What’s ahead? What do you see
  • Depth perception: How far ahead is itNo matter using ToF(Time of Flight), the sensor emits modulated near-infrared light, which is reflected after meeting the object. The sensor calculates the Time difference or phase difference between light emission and reflection to convert the distance of the object being photographed, so as to generate depth information.Or structured light calculation, by projecting the encoded laser spot array into the detection space, the space is calibrated and assisted in the calculation of three-dimensional space position.

The obtained Cloud point data in the figure below shows that a total of 12464 points with XYZ THREE-DIMENSIONAL coordinates are collected at this time.

Daydream (handheld device maker e-ten)

The goal is to give users the best virtual experience, by defining a set of minimum hardware performance standards and providing developers with an easy-to-use Daydream API, eliminating the screen lag that causes vertigo and achieving the most cost-effective virtual experience.

hardware

Phab 2 Pro

The world’s first consumer Tango device uses Snapdragon 652, 4GB of ram and 64GB of storage. Importantly, both domestic and foreign versions have full Tango features. Jingdong can directly order, support 211! The disadvantages are that the 6.4-inch screen is too big to be used as a normal phone, and the appearance level is not high enough. Tango is Android’s “eye” for 3d worlds:












ZenFone AR

The world’s first consumer Tango+Daydream device uses snapdragon 821 to guarantee the Daydream experience. The first Daydream phone also uses Snapdragon 821 on Google Pixel and Asus Zenphone 3. Since the Daydream Viewer is now compatible with phones with 5.0 to 5.7 inch screens, the ZenFone AR should work pretty well with Android 7’s (Nougat) 5.7 inch screen.

Tango development

First, you’ll need a Tango device, because there are no emulators that can emulate Tango-related camera hardware, and the Phab 2 Pro is a great developer! Now take Java API development as an example to enter Tango APP development. If you are familiar with Unity 3D development, you can directly use Unity 3D package, because 80% of Tango Apps are developed with Unity 3D, of course, most of them are games!

Environment to prepare

Android Studio 2.2

USB debugging

Phab 2 Pro Enable USB debugging in Developer Option. If you do not have Developer Option, you must be a new Android Developer. Click Build Number 7 times in a row under Settings->About Phone to summon Developer Option.

Get sample code

git clone https://github.com/googlesamples/tango-examples-java.git

Open the Java Cloud Point Example

I’m just going to control plus R














Error:Execution failed for task ':app:transformNative_libsWithStripDebugSymbolForDebug'.> java.lang.NullPointerException  (no error message)

Just keep compileSdkVersion and targetSdkVersion the same as buildToolsVersion.

Successful installation








More and more

Github.com/lvonasek/ta… C API is used to process the Point Cloud collected to realize the APP of 3D reconstruction. Approximate scanning effect:

Daydream development

Again, the purpose of Daydream can be seen as simply an updated version of Cardboard, but defining a minimum hardware standard that meets the user experience and developing a full set of apis that make it easy for developers to create a high-quality experience. The same Daydream APP requires a Daydream Ready phone to run or one that can run Cardboard Apps larger than Android 4.4(KitKat), again using the Phab 2 Pro. Daydream is used to accomplish the following development tasks:

  • Lens distortion correction.
  • Spatial audio.
  • Head tracking.
  • 3D calibration.
  • Side-by-side rendering.
  • Stereo geometry configuration.
  • User input event handling.

Get the code

git clone https://github.com/googlevr/gvr-android-sdk.git

Android Studio

Open the GVR – android SDK






















conclusion

With ZenFone AR and Daydream Viewer, which are expected to cost less than 5,000 yuan, you can enjoy the freedom of immersing yourself at home in Google Street View, YouTube, Netflix, Hulu, HBO, and VR games like Fantastic Beasts, Where to Find Them, Need for Speed, and Gunjack 2 don’t sit still but offer 360-degree views. The hardware and apis for perfect VR are ready, so start your own development plan!

Last Updated:



Links:
Yangbo. Tech / 2017/01/03 /…