Difference between revisions of "Oculus Rift"

From ETC Public Wiki
Jump to: navigation, search
m (Basic Setup)
(Using Camera Rig)
Line 28: Line 28:
  
 
===Using Camera Rig===
 
===Using Camera Rig===
 +
 +
The Camera Rig includes several pivot points that you can attach game objects into like the case in SteamVR.
 +
 +
The Camera Rig in Oculus is bound with a [OVRManager] script that includes most of the settings. For the camera, usually you only need to modify '''[CenterEyeAnchor]'''. For the two controllers, you can take a look into '''[LeftHandAnchor]''' and '''[RightHandAnchor]'''. Oculus introduces hand based interaction that is not configured in this way, so in most cases you will never need to change that.
 +
 +
To attach a controller model and show it in the scene, drag [OVRControllerPrefab] into the anchor points and you will see that!
 +
 +
In most cases you will never need to change this, but if you are switching between scenes that include Locomotion behaviours you might need to check the Camera Rig tracking and recenter options. Here are the relevant options:
 +
 +
* '''TrackingOriginType''': The method that the origin of the tracking space will be calculated. It makes no difference in Oculus Rift S, but in Oculus Rift CV1 the floor level is calculated from the height information you have configured in Oculus Runtime.
 +
* '''Reset Tracker on Load'''
 +
* '''Allow Recenter'''
  
 
===Using Avatar===
 
===Using Avatar===

Revision as of 15:47, 13 October 2019

The Oculus Rift family (Oculus Rift and Oculus Rift S) is a virtual reality system that completely immerses you inside virtual worlds. Complete with touch controllers and two sensors (Oculus Rift only) for the ultimate VR experience.

Getting Started

Basic Setup

  1. Open your Unity Project.
  2. Go to Edit -> Project Settings.
  3. Go to Player -> PC Standalone -> XR Settings. Then check Virtual Reality Supported option, and make sure Oculus ranks first in the Virtual Reality SDKs. It is highly recommended to remove OpenVR from SDK list to avoid potential conflicts with SteamVR.
  4. Go to Other Settings section. Under Rendering change Color Space to Linear. Then under Configuration set Api Compatibility Level to .NET 4.x. Sometimes an editor restart is required.
  5. If you want to hide Splash Image when starting your application, go to Splash Image section and uncheck Show Splash Screen.
  6. If you want to hide config window when starting your application, go to Resolution and Presentation, and under Standalone Player Options set Display Resolution Dialog to Disabled or Hidden by Default.
  7. Download Oculus Integration plugin from Unity Asset Store.
  8. Import it into your project, and click on "Yes"/"Upgrade" for the two windows titled [Update Oculus Utilities Plugin] and [Update Spatializers Plugin]. This will require a restart for Unity.

Scene Setup

  1. After you finish the Basic Setup, delete [Main Camera] from the hierarchy.
  2. From your project window, select Assets -> Oculus -> VR-> Prefabs.
  3. Drag [OVRCameraRig] your hierarchy
  4. You are all set! If you need a more complete camera set with player movement control, use [OVRPlayerController] instead of [OVRCameraRig].

Example Scenes

Oculus examples are under Assets -> Oculus -> SampleFramework -> Usage. Check them out to get started with the basics of Oculus platform.

Programming Information

Using Camera Rig

The Camera Rig includes several pivot points that you can attach game objects into like the case in SteamVR.

The Camera Rig in Oculus is bound with a [OVRManager] script that includes most of the settings. For the camera, usually you only need to modify [CenterEyeAnchor]. For the two controllers, you can take a look into [LeftHandAnchor] and [RightHandAnchor]. Oculus introduces hand based interaction that is not configured in this way, so in most cases you will never need to change that.

To attach a controller model and show it in the scene, drag [OVRControllerPrefab] into the anchor points and you will see that!

In most cases you will never need to change this, but if you are switching between scenes that include Locomotion behaviours you might need to check the Camera Rig tracking and recenter options. Here are the relevant options:

  • TrackingOriginType: The method that the origin of the tracking space will be calculated. It makes no difference in Oculus Rift S, but in Oculus Rift CV1 the floor level is calculated from the height information you have configured in Oculus Runtime.
  • Reset Tracker on Load
  • Allow Recenter

Using Avatar

Using Oculus Touch

Getting Input

WIP

Triggering Haptic

WIP

Using Hands

WIP

Stereo Rendering

Stereo rendering may introduce some problems to shaders that use render texture and camera position. In most cases you need to manually modify the shader and related scripts to make sure the camera poses are correct for each eye. Please check Unity's reference and this post for more information.

Useful Links

  1. https://www.youtube.com/watch?v=r1kF0PhwQ8E&list=PLrk7hDwk64-Y7ELKfkw8ox8TaT9y3gNpS&index=7

Art (2D & 3D) Information

Currently there is no art information to know about the Oculus Rift.

Sound Information

Oculus provides with a spatializer that can enhance sound performance. You can learn more about this feature and guidelines for spatial audio in this link.

Design Guidelines & Tips

  • Oculus Touch provides a way to act like a hand and introduces virtual hand gestures in the input module. Taking good use of it would be great instead of using X/Y and A/B buttons.
  • For Oculus Rift family, the floor calibration is not as good as Vive's Lighthouse. Take special care when you are designing interaction with objects on the floor level.
  • For Oculus Rift CV1, when you are using two-sensor setup your headset will be tracked correctly only if it can be seen by the sensor.
  • The Oculus Touch controller is only visible when it's in the headset's camera view (Oculus Rift S) or it can be seen by the sensor (Oculus Rift CV1).

Example Projects

Currently there are no example projects for the Oculus Rift.

Previous ETC Projects

Currently there are no ETC projects that use the Oculus Rift.

BVW

Currently there is no BVW-specific information to know about the Oculus Rift.