Build Your Own VR Experience
(For Gear VR)

Give it a try!

 Requirements     o     Set Up    o     Build    o     Deploy

 

 

Software Requirements
  • Unity 5.3 or higher
  • Oculus runtime 0.8
  • Oculus Unity Utilities
  • OS X: At this time, it’s possible to develop on OSX 10.9+ with the Oculus 0.0.5 runtime, but as Oculus have paused development for OS X, we recommend Windows for native VR functionality in Unity.
  • Windows: Windows 7, 8, 8.1, and Windows 10 are all compatible.
  • Android: We recommend using Android OS Lollipop 5.1 or higher.
  • Graphics card drivers: Please ensure your drivers are up to date. Older drivers may not supported. Please check the Oculus Configuration Utility to see if there are issues with your driver.
  • Oculus Runtime: To use VR support in Unity 5.3, please use Oculus Runtime 0.8 or higher.
Hardware Requirements

Achieving the required frame rate for the HMD is essential for a good VR experience, and this must match the refresh rate of the panel used in the HMD. On DK2 this must be 75fps, and for the Gear VR, it must be 60fps. If the frame rate drops below this, it is particularly noticeable to the user, and will often lead to nausea.

While achieving a consistent frame rate is essential, the GPU in the attached PC must also be capable of outputting the required resolution at the HMD panel’s refresh rate. In the case of DK2, this is 1920 x 1080 at 75hz. Bear in mind that if you’re intending to develop for the commercially released Oculus Rift (CV1), this has a 2160 x 1200 resolution at 90hz, which will be more demanding than the DK2.

If you are using the DK2, please make sure that your hardware is capable of outputting the required resolution at the required refresh rate. Many laptops use a chipset to switch between the discrete and integrated chipsets, and these chipsets are usually unable to output 1920 x 1080 at 75hz, leading to a sub-optimal VR experience, and nausea. Please refer to the Oculus documentation, and the Oculus Ready PCs guide for recommended hardware.

Setting Up Your First Project

Step 1: Create a new empty project from the Unity Home Screen which loads when you first launch Unity. Make sure it is set to 3D.






Step 2: Go to File > Build Settings from the top menu. Select Android as the platform. Set Texture Compression to ETC2 (GLES 3.0).











Step 3:
Make sure you are working in a 3D space. *Note, when previewing a VR project by entering display mode, you will not see two side-by-side images but one image as it would be viewed by the player!

Step 4:
Go to Edit > Project Settings > Player. In the Player Settings (> Other Settings > Rendering) window, check off Virtual Reality Supported.

Step 5:
Build a scene to test. Perhaps a small cube on a floor? Place objects in front of the main camera.

Step 6:
Save your scene (File > Save Scene).



Step 7:
Enter Play Mode to ensure your scene looks good.

Step 8:
Save your project!

//www.artihuman.com/wp-content/uploads/2016/04/Screen-Shot-2016-04-12-at-6.12.24-PM.png//www.artihuman.com/wp-content/uploads/2016/04/Screen-Shot-2016-04-12-at-6.13.49-PM.png//www.artihuman.com/wp-content/uploads/2016/04/Screen-Shot-2016-04-25-at-5.03.07-PM.png//www.artihuman.com/wp-content/uploads/2016/04/Screen-Shot-2016-04-27-at-8.04.51-PM.png//www.artihuman.com/wp-content/uploads/2016/04/Screen-Shot-2016-04-27-at-8.06.34-PM.png
Building VR Interaction

The setup is simple, in theory.

Step 1: Bring in an OVRPlayerController object. You will use this instead of the standard FPS controller.

Step 2: Attach a Main Camera as a child of the OVRPlayerController.

Step 3: This Main Camera from the OVR library should have the VRCameraUI and TrackingSpace as children.

Step 4: To move the player, use one of the attached scripts and place it on the OVRPlayerController. For a simple movement that moves the player forward with one tap, in the direction in which you are looking, use the OVR_PlayerMove script. For forwards and backwards movement, use the GearVRInput script (has ability to add left and right movement).

Step 5: If you are having broken or double vision, or the reticle is not following the head movement, disable the CenterEyeAnchor under the TrackingSpace object.



GearVRInput.cs

OVRPlayerMove.cs


//www.artihuman.com/wp-content/uploads/2016/04/Screen-Shot-2016-04-27-at-9.22.26-PM.png
//www.artihuman.com/wp-content/uploads/2016/04/Screen-Shot-2016-04-27-at-9.23.10-PM.png
//www.artihuman.com/wp-content/uploads/2016/04/Screen-Shot-2016-04-27-at-9.23.44-PM.png
Deploying to Mobile Device

To set up your environment for Gear VR development, you’ll need to set up both Unity and your phone for Android development first. Keep in mind that the consumer GearVR supports the Samsung Galaxy S6, S6 Edge, S6 Edge+, S7, S7 Edge, and Note 5 handsets only at present:

1) Set up Unity for Android development

2) Install the USB drivers for your phone

Enable developer settings on your phone by following this guide, then enable USB debugging on the developer menu.

Get an OSIG file for your device. Place it in the Assets/Plugins/Android/assets/ directory of your project.

Refer to this guide if you need more assistance!