Skip to content

he VR ONE SDK is a VR SDK for Unity and aims to help developers to create great virtual reality experiences for the VR ONE head-mounted virtual reality device. For now, it supports mobile apps made with Unity3D for iOS and Android platforms.

License

Notifications You must be signed in to change notification settings

zhangjingpu/vrone

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Release Notes VR ONE Unity 3D SDK 1.3

  • Added support for Google Nexus 5, LG G3, Samsung Galaxy S4, Samsung Galaxy S6
  • Added Immersive Mode to hide soft buttons for Google Nexus 5 and LG G3 (Thanks to Rakshith Anand)
  • Added MenuWithHotspot.prefab for easy menu integration
  • Added new LUTs
  • Added possibility to disable distortion in order to get additional FPS
  • Added image shift with device specific values, if distortion is disabled. This ensures that the center of left/right images are fitting the ZEISS VR ONE optics.
  • Added headtracking for android devices without game rotation vector (Samsung Galaxy S4)

Release Notes VR ONE Unity 3D SDK 1.2

  • Added support for all Galaxy S5 models

Release Notes VR ONE Unity 3D SDK 1.1

  • Added native head tracking plugins
  • Added VR One default menu
  • Updated LUTs

ZEISS VR ONE SDK

Table of Contents:

About ZEISS VR ONE

ZEISS VR ONE is a head-mounted virtual reality device, compatible with various smartphones. For more information, please go to http://zeissvrone.tumblr.com/.

What is the VR ONE SDK?

The VR ONE SDK is a VR SDK for Unity and aims to help developers to create great virtual reality experiences for the VR ONE head-mounted virtual reality device. For now, it supports mobile apps made with Unity3D for iOS and Android platforms.

What can I expect from the VR ONE SDK?

The VR ONE SDK features an open source, MIT-licensed Unity package, which provides a split sceen and/or stereo two-camera setup and applies a configurable radial and chromatic pre-distortion effect to prepare the image for optimal display in the VR ONE for various smartphone models.

The SDK is currently in an experimental stage. A final release as well as the complete code base will be provided once the VR ONE becomes available for sale.

Split-screen example Pre-distortion example

Wait, I can use the VR ONE SDK and sell my app without paying you a cent?

You got it. The VR ONE SDK is supposed to help you jumpstart your app development.

When should I use VR ONE SDK?

If you are a developer who aims to develop or adapt your mobile app for VR ONE with Unity, you will be able to jumpstart your Unity project by utilizing the VR ONE SDK. If you are using native development in Android or iOS, we will shortly support you with tutorials in the VR ONE wiki.

What about head-tracking?

Together with the VR One Unity 3D SDK, ZEISS offers a multi-sensor head tracking plugin. It is already activated by default in the VR One Unity Package, but if you wish to use your own head-tracking, you can easily deactivate it.

The head-tracking plugin provided by ZEISS makes use of all the motion sensors available on your smartphone to reduce latency between head-movement and camera update as much as possible. The plugin is is provided as a .a library for iOS, and a .jar library for Android. A sample use for both the platforms can be found in the provided demo scene.

How do I use the head-tracking library natively, without Unity?

iOS

The VR One Head Tracking plugin (which can be found here) consists of three functions:

void _StartCameraUpdates(); Initialiser function. Should be called once.

void _GetQuaternionUpdate(float** arrayToSave); Calculates the camera rotation update, and should thus be called on continually. The parameter it receives is a pointer to the float array where the Quaternion values should be saved. As a quaternion contains four components, at the end of the function call this array contains the components ordered in x,y,z,w. This quaternion should then be directly used in the camera rotation update.

void _ApplicationDidResume (); Re-calibrates the view's zero reference. Can be called, for instance, from applicationWillEnterForeground. Not calling this function will result in a small drifting each time the applications re-opens, for the camera was set to the wrong direction,

It is also important to note that this library requires the use of CoreMotion.framework and SceneKit.framework, which should be added to XCode's Link Binary with Libraries Build Phases.

Android

In order to use the .jar (available here) VR One Head-Tracking library with your native Android application, simply import de.zeiss.mmd.headtracking to your project, and you can then call the public static double[] getRotation(Context context) function. For the calculations done internally, the function requires the context it is called from. As the head tracking is optimized for 60 fps, the function should be called approximatly 60 times per second. The double array delivered represents the four Quaternion components, ordered as x, y, z, and w.

What are the requirements to use the Unity package?

For using the pre-distortion functionality, you need a Unity Pro license with at least a iOS or Android platform license. If you use our integrated iOS Head-Tracking, you will need to add the SceneKit framework to the [Link Binary With Libraries] Build Phase.

What else do you provide?

The VR One Unity SDK provides you with a menu which can be created in two diffrent ways. First By using the Menu-prefab 'MenuWithHotspot', which Zeiss recommends to be integrated into any application or creating one of your own.

####Menu-prefab provides two basic functionality:

  1. View recenter, to allow the user to reposition his/her head and have the view adjusted to it.
  2. Jump to VR One Media Launcher button.

By allowing the user to navigate between VR apps directly through head-tracking accessible buttons, the VR One aims provide a consistent virtual reality experience across all the supported apps.

In the demo scene you can see a basic menu set up with a recenter icon and the jump to launcher icon.

####Creating your own menu

You can create your own menu by using the MenuWithHotspot.prefab. Open the MainMenu GameObject in the Inspector and increase the Size value under "Rows->Element0->Icons" to fit your needs. The desired script to be executed for a specific menu element, has to be added to the related Callback Component.

Which smartphones are currently supported?

The VR ONE SDK will work with the following smartphone models.

  • Apple iPhone 6
  • LG G3
  • Google Nexus 5
  • Samsung Galaxy S4
  • Samsung Galaxy S5
  • Samsung Galaxy S6

Important note: Compatibility is being extended in future. This list is being updated accordingly.

Please also check the availability of VR ONE smartphone drawers for certain models on the tumblr blog: http://zeissvrone.tumblr.com/

When your game targets iPhone use Unity 4.5.4p1 or later. In your PlayerSettings configuration provide all required launch images so that project will run at full resolution. Also set Target Device to iPhone only.

Give me a Demo

The <vronesdk.unitypackage> can simply be dragged into an empty Unity project and the the scene in the Demo/Scenes folder can be opened. This will setup the VROneSDK and a Scene with a spinning cube and three lights.

Getting started

Using the VR ONE SDK is very simple:

  1. Download the <vronesdk.unitypackage> and drag it into your Unity project. The <vronesdk.unitypackage> provides the VROneSDK prefab in the VROneSDK folder. The VR ONE SDK is intended to replace the cameras in your scene.
  2. Drag the VR ONE SDK into your scene, and remove any other camera from your scene.
  3. You can then associate the VROneSDK, the VROneSDKHead, and its attached GameObjects with your custom scripts for head tracking and gameplay.

The VROne SDK requests 60fps on every device. Additionally interface orientation in Unity should be set to landscape left.

Changing the camera distance (mono / stereo)

The camera view can be adjusted through the VROneSDK singleton. By simply getting ahold of the shared instance and setting the IPD to the preferred value. A value of zero (0) would indicate that both cameras are on top of each other and are rendering the identical image (e.g. mono). Increasing the IPD value results in a stereo image with increasing distance between the eyes.

Example

VROneSDK.sharedInstance.IPD = 0.0;

would produce a mono (two identical images side by side) view. Similarly

VROneSDK.sharedInstance.IPD = VROneSDK.VROneSDKDefaultIPD;

would set the IPD to 0.065 and result in a stereo view (the two images are rendered from slightly differing viewports).

You can all well set runsInStereoMode to enable or disable mono-/stereo-mode:

VROneSDK.sharedInstance.runsInStereMode = true;

Enabling / Disabling VR ONE

When user hasn't put on the VR ONE yet, use

VROneSDK.sharedInstance.isVROneEnabled = false;

to disable splitting the view and present a regular screen to the user. Only one camera will be used for rendering the scene and no distortion will be applied.

Once your game starts set this value to true and thus enable the full VROne experience for the user.

Disabling / Enabling the pre-distortion

The applied distortion can be disabled (e.g. for higher performance) if needed by using

VROneSDK.sharedInstance.isDistortionEnabled = false;

If distortion is disabled, the eye images are shifted by the device specific value A to fit the physical distance of the VR One Lenses. The values for all supported smartphones are given in VROneSDKDevice.cs. See http://developers.zeissvrone.com/img/image_shift.gif for more information.

Building the application

After finishing your application in Unity, you will want to export it for use with the iPhone or Android device. In Unity, simply go to File/Build Settings, select iOS or Android, and Build.

For Android, that is all you need to do. For iOS, however, it is important to note that after the exported XCode file is built, it is necessary to add the SceneKit framework. To do this, select the application target in XCode, go to Build Phases, and under "Link Binary with Libraries", add SceneKit.framework. Moreover in player settings you have to set Open GL ES 3.0 as Graphics API (iOS Metal is not supported).

Where can I ask technical questions?

Please check Stack Overflow for already existing Q&A’s: http://stackoverflow.com/questions/tagged/vrone

If your question has not already been answered, feel free to submit your question at StackOverflow. Please add the tags „vrone“ and „unity3d“ to your question. The developer team will do its best to answer your question as fast and good as possible. http://stackoverflow.com/questions/ask

How can I contribute to VR ONE SDK development?

Why does my screen rotate?

  • For the Samsung Galaxy S4 there's a gyro callibration which takes place at app start. To avoid a bad calibration, the smartphone has to lie still, till the app is started.

About

he VR ONE SDK is a VR SDK for Unity and aims to help developers to create great virtual reality experiences for the VR ONE head-mounted virtual reality device. For now, it supports mobile apps made with Unity3D for iOS and Android platforms.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published