Intro to Oculus CPSC 585 Oculus General Workings
- Slides: 19
Intro to Oculus CPSC 585
Oculus
General Workings Frames to render Position / Orientation of cameras (eyes)
Distortion • Scene to be rendered in split-screen stereo with half of the screen used for each eye • Asynchronous Time. Warp: used to smooth out literally unplayable games
Rendering to Oculus • Scene to be rendered in split-screen stereo with half of the screen used for each eye
Rendering to Oculus • Each eye is represented by a camera • Both of which are separated but parallel in direction IPD
Eye Positions / Orientations • Oculus contains a bunch of sensors for tracking orientation • Another sensor is used for translation
Initialize SDK • ovr_Initialize(sdk. Params) – sdk. Params as nullptr uses default values – Log. Callback
Initialize HMD • ovr_Create(&session, &luid) • luid – Handle to graphics card that has the HMD attached • hmd. Desc = ovr_Get. Hmd. Desc(session) – Resolution – Refresh Rate – Default. Eye. Fov – Etc….
Initialize buffers for each eye • ovr. Sizei ovr_Get. Fov. Texture. Size(…) – Calculates the recommended viewport size for eye given fov • ovr_Create. Texture. Swap. Chain. GL(…) – Series of buffers which hold frames to be displayed
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_Get. Render. Desc(…) – rendering parameters for the specified eye – Hmd. To. Eye. Offset (translation of given eye in meters)
Main Loop • Get abs time at which the current frame should be displayed • ovr_Get. Predicted. Display. Time(…) • Get predicted pose based on abs time, distance of eye from headset, etc… • tracking. State = ovr_Get. Tracking. State(…) • ovr_Get. Eye. Poses(…)
Pose and Position
Render to an Eye • ovr_Get. Texture. Swap. Chain. Buffer. GL(…) – 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
Updating Oculus • ovr. Layer. Eye. Fov – Combines both swap chains with FOV and IPD – Can use many layers for Game, GUI, etc… • ovr_Submit. Frame(…) – Submits layer for rendering
Shutdown • delete depth textures and framebuffers for each eye • ovr_Destroy. Texture. Swap. Chain(…) for each eye • ovr_Destroy(…) destroy session • ovr_Shutdown() shutdown sdk
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
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
Resources • Oculus SDK is well documented – OVR_CAPI. h, OVR_CAPI_GL. h • http: //pages. cpsc. ucalgary. ca/~laringha/585 W 17. html
- Cpsc 585
- University of calgary orientation
- Sin and cos
- 600-585
- Opwekking 585
- Opwekking 585
- Gezang 177
- 888-585-9008
- Opwekking 539
- Comp 585
- Oculus optometry
- Organum visus anatomy
- Oculus ultimus
- Oculus rift tutorial
- Short working recouped
- Where did general lee surrender to general grant?
- Diferencia entre gran plano general y plano general
- Ubc cpsc 259
- Cpsc 322
- Cpsc 322