Presentation is loading. Please wait.

Presentation is loading. Please wait.

Intro to Oculus CPSC 585.

Similar presentations


Presentation on theme: "Intro to Oculus CPSC 585."— Presentation transcript:

1 Intro to Oculus CPSC 585

2 Oculus 90Hz refresh rate 2 OLED panels 2,160 x 1,200 resolution
110-degree field of view (measured diagonally) 5x5 foot space to move in

3 General Workings Frames to render
The software requests your head position. The CPU processes the scene for each eye. The GPU renders the scenes. The Oculus Compositor applies distortion and displays the scenes on the headset. Position / Orientation of cameras (eyes)

4 Distortion Scene to be rendered in split-screen stereo with half of the screen used for each eye Asynchronous TimeWarp: used to smooth out literally unplayable games Each image is slightly offset from one another creating the 3D effect ATW is a technique that shifts the rendered image slightly to adjust for changes in head movement Adaptive Queue Ahead – CPU can operate on head position at the same time rendering is occurring

5 Rendering to Oculus Scene to be rendered in split-screen stereo with half of the screen used for each eye Each image is slightly offset from one another creating the 3D effect

6 Rendering to Oculus Each eye is represented by a camera
Both of which are separated but parallel in direction interpupillary distance (IPD): Human eye pupils are approximately 65 mm apart. IPD can be set in user profile Lenses can be physically adjusted as well IPD

7 Eye Positions / Orientations
Oculus contains a bunch of sensors for tracking orientation Another sensor is used for translation

8 Initialize SDK ovr_Initialize(sdkParams)
sdkParams as nullptr uses default values LogCallback Initialize Oculus SDK

9 Initialize HMD ovr_Create(&session, &luid) luid
Handle to graphics card that has the HMD attached hmdDesc = ovr_GetHmdDesc(session) Resolution Refresh Rate DefaultEyeFov Etc…. Create an ovrSession object for the headset Compute the desired FOV and texture sizes based on ovrHmdDesc data

10 Initialize buffers for each eye
ovrSizei ovr_GetFovTextureSize(…) Calculates the recommended viewport size for eye given fov ovr_CreateTextureSwapChainGL(…) Series of buffers which hold frames to be displayed Calculates the recommended viewport size for rendering a given eye within the HMD with a given FOV cone. Swap chain, basically double buffering

11 Initialize buffers for each eye
For each buffer in swap chain Bind and set wrap and filter behaviour Create a framebuffer and a depth buffer to render to ovr_GetRenderDesc(…) rendering parameters for the specified eye HmdToEyeOffset (translation of given eye in meters) Calculates the recommended viewport size for rendering a given eye within the HMD with a given FOV cone. Swap chain, basically double buffering Use sRGB sRGB provides an optimized use of each value of the storage range so that these values become more relevant for our eyes perception sRGB is a non-linear color space

12 Main Loop Get abs time at which the current frame should be displayed
ovr_GetPredictedDisplayTime(…) Get predicted pose based on abs time, distance of eye from headset, etc… trackingState = ovr_GetTrackingState(…) ovr_GetEyePoses(…) Prediction is used to compensate for the latency in the system Pose corresponds to time in future when frame will be displayed trackingState: predicted HMD pose, etc… Also contains information about hand positions

13 Pose and Position

14 Render to an Eye ovr_GetTextureSwapChainBufferGL(…)
Get current buffer from swap chain Bind and clear that eye’s frame buffer Calculate eye Proj * View matrix transform Render Scene Repeat for other eye

15 Updating Oculus ovrLayerEyeFov ovr_SubmitFrame(…)
Combines both swap chains with FOV and IPD Can use many layers for Game, GUI, etc… ovr_SubmitFrame(…) Submits layer for rendering you can use multiple layers and layer types for advanced rendering

16 Shutdown delete depth textures and framebuffers for each eye
ovr_DestroyTextureSwapChain(…) for each eye ovr_Destroy(…) destroy session ovr_Shutdown() shutdown sdk

17 Best Practices Don’t affix an image in front of the user, such as a full-field splash screen Images presented to each eye should differ only in terms of viewpoint Consider supersampling and/or anti-aliasing

18 Best Practices Code should run at a frame rate equal to or greater than the Rift display refresh rate Repeated exposure to the Rift makes you less susceptible to sickness Do not use “head bobbing” camera effects Avoid using Euler angles

19 Resources Oculus SDK is well documented
OVR_CAPI.h, OVR_CAPI_GL.h


Download ppt "Intro to Oculus CPSC 585."

Similar presentations


Ads by Google