12. REPLACE UNITY’S “MAIN CAMERA” WITH OCULUS CAMERA PREFAB
OCULUS SDK INTEGRATION / BUILD
13. https://developer.oculus.com/tools/osig/
Signature File ?: In order to access low-level device functions through APIs provided by our SDK.
place the signature file in:
Project/Assets/Plugins/Android/assets/
OCULUS SDK INTEGRATION STEP(GEARVR ONLY)
15. ● OvrCapi.cs
C# wrapper for LibOVR and it exposes all device functionality, allowing you to query and
set capabilities for tracking, rendering and more
● OVRManager.cs
Simple/legacy support for tracking and HMD status
● OVRCameraRig.cs
The camera rig and most settings ○ Child OVRCameras do the rendering
● OVRDisplay.cs
HMD pose and rendering status of the HMD
● OVRTracker.cs
Infrared tracking camera pose, frustum and status
● OVRPlayerController.cs
VR-optimized CharacterController
● OVRMainMenu.cs(OVRDebugInfo.cs)
Debug info, heads-up display
Scripts for OVR
OCULUS SDK INTEGRATION
16. OCULUS SDK INTEGRATION
UnityEngine.VR in Beta (from Unity 5.1)!! – Don’t need to import unity package anymore!
class VRDevice {
string family; // vendor
bool isPresent; // attached and working?
string model; // HMD type
IntPtr GetNativePtr(); // low-level access
}
class HeadTracking {
Vector3f GetEyePosition(int eye);
Quaternion GetEyeRotation(int eye);
}
class VRSettings {
bool enabled; // use VR?
float ipd; // inter-pupillary distance
VRDeviceType loadedDevice; // code path
bool mirrorMode; // preview on desktop?
bool monoscopic; // same in both eyes?
float renderScale; // pixel density
}
17. OCULUS BASICS: PERFORMANCE
● On CrescentBay, must always hit 90 FPS
● On Gear VR, must always hit 60 FPS
● Frame is the most important for comfortable
18. ● Optimize early and often for Android
○ Single-pass forward render
○ Bake “lighting, reflection, shadows”
○ 50-100k vertices or triangles
○ 50-100 batches
○ 2xMSAA
○ Maximize texture compression, mip mapping, and
cache locality
○ Greedily maximize perf to save power
OCULUS BASIC: OPTIMIZATION ON ANDROID
19. 1. Go to your device Settings -> Application manager -> Gear VR Service
2. Tap on "Manage storage"
3. Tap the "VR Service Version" number six times.
4. Wait for scan process to complete and you should now see the Developer
Mode toggle on this screen.
OCULUS BASIC: RUN WITHOUT GEAR VR
20. OCULUS BASICS: INPUT OPTIONS
● Mouse + keyboard
○ Limits movement
○ Player can’t see keyboard – difficult to use
● Gamepads
○ Allows people to sit further from hard objects
○ Limited inputs & axes
● Touchpad
○ Swipe, tap gestures
● Motion-sensing “wand” controllers
○ Razer Hydra, WiiMote, PS Move
● Body-motion cameras
○ Leap, Kinect, SoftKinetic
Image sources: Wikipedia, Leap Motion
22. OCULUS BASICS: TIMEWARP
Any other way to apply sensor before the end of the frame?
TimeWarp – Projected rendering - Pioneered by John
13.3 ms
75 FPS
23. OCULUS BASICS: TIMEWARP
Any other way to apply sensor before the end of the frame?
TimeWarp – Projected rendering - Pioneered by John
28. HOW TO SUBMIT GAMES TO OCULUS STORE
1. 회사이름과 함께 오큘러스에 드랍박스 공유 폴더 신청(submissions@oculus.com)
2. 오큘러스에서 다음과 같은 경로의 드랍박스를 공유해줌 - (Uploads_[YourCompanyName])
3. 해당 폴더 내에 다음과 같은 정보를 담은 폴더 생성 – ApplicationName_SubmissionDate (ex. VR_20140704)
4. 해당 폴더에 사이닝 된 APK 파일과 앱정보 파일(양식 따로 제공) 저장
4. 해당 폴더 내에 Images 폴더 생성 및 필요 이미지 저장
( 각각의 이미지는 2560 X 1440 PNG 파일이어야 하고 아래와
같은 용도로 총 6장의 이미지 파일이 필요 )
- Main Image (x1): 메인 이미지로 사용할 사진
- Gallery Images (x5): 피처드나 2D 스토어 모드에서 사용 될 이미지
5. submissions@oculus.com에 자료 업로드 완료 통보
6. 심의
http://static.oculus.com/submissions/TemplateDocuments.zip
Backward compatible with legacy Oculus script API. Minor work to upgrade - above API has moved inside of Unity. Plain C# Rift wrapper OvrCapi.cs to be a separate download; not supported on Gear VR. “Moonlight” Oculus utility scripts for Gear VR only.
Higher performance on PC: ~1M verts/tris, 1k draw calls, 4xMSAA, more perf to spare.