VR系列——Oculus Rift 介绍指南:三、SDK概述

来源:互联网 发布:人民网数据新闻 编辑:程序博客网 时间:2024/04/28 18:25

SDK概述

Oculus0.8的发布使SDK从基于HMD模型转变为基于会话模型并且加入了多个新特性。

SDK更新

这部分描述SDK的一些更新特性。

新特性

以下是关于Oculus SDK 和runtime的新特性:

  • 改进支持win10。
  • 增加了 ovr_GetSessionStatus,可以返回头戴式设备是否存在以及是否有VR聚焦并且可以渲染到头戴式设备。
  • 在OVR_CAPI_Util.h中增加了ovr_Detect,使你能够在没有初始化LibOVR时察觉到存在的头戴式设备。这对于一个是VR却是非VR模式的游戏很有用。
  • 在ovrTrackingState中增加了HandStatusFlags,可以指定Oculus 触摸控制器是否正在被追踪。状态包括方向和位置。
  • 在ovrLayerEyeFov中增加了SensorSampleTime,它可以指定渲染姿势什么时候被计算。这个有助于测量应用程序追踪延迟。
  • 增加ovr_GetTrackingCaps来获取设备的追踪能力。
  • ovr_ConfigureTracking不再需要使用,除非你想禁用追踪特性。默认情况下ovr_Create使得任何设备都支持完整的跟踪能力。
  • 增加了ovrLayerHudMode,支持头戴式设备用户看到一个图层的信息。
  • 在ovrControllerType中增加了ovrControllerType_None 和 ovrControllerType_XBox 。
  • 加入Oculus调试工具来简化故障排查。更多信息可以查看Oculus DebugTool。

runtime变更

变更包括:

  • 如果你有NVIDIA GPU,确保升级到358.70或者更新的版本驱动程序。获取驱动的地址:https://developer.nvidia.com/gameworks-vr-driver-support
  • 如果你有AMD GPU,推荐催化剂15.10beta或更新版本。获取驱动的地址:
    http://support.amd.com/en-us/kb-articles/Pages/latest-catalyst-windows-beta.aspx

API的更新

这次发布主要是API的修订版。API的更新包括:

  • 应用不再需要调用ovr_ConfigureTracking。 ovr_Create默认使得任何设备都支持完整的跟踪能力。
  • 用ovr_GetPredictedDisplayTime替换ovr_GetFrameTiming。
  • 在ovrTrackingState中增加latencyMarker。当调到ovrTrue,这意味着它将会在渲染循坏体中使用到,并且会用来计算延迟。
  • 为了强调会话模型,把ovrHmd重命名为ovrSession,hmd重命名为session。
  • ovrLayerType_QuadInWorld 和ovrLayerType_QuadHeadLocked 更名为
    ovrLayerType_Quad 并且现在和 ovrLayerFlag_HeadLocked 标志区分开了。
  • 增加ovrMaxLayerCount,设置最大延迟数为32。
  • 移除ovrInit_ServerOptional。如果你使用这个检测OVRService是否可用,定期调用ovr_Initialize或者轮询ovr_Detect来代替。
  • 从ovrTrackingCaps 中移除ovrTrackingCap_Idle。

已知的问题

以下是已知的一些问题:

  • Oculus服务可能会在Oculus Config Util收集诊断日志时发生死机。如果发生了这种情况,服务会自动重启并且日志会保留。
  • 当同时运行demo场景和其他VR app时,Oculus服务和Config Util也许会假死机,

从SDK0.7.x迁移到SDK0.8

迁移:

  1. 更新ovr_GetPredictedDisplayTime对ovr_GetFrameTiming的调用,使用新的语法。
  2. 更新ovrHmd hmd实例为ovrSession session。
  3. 移除使用ovrInit_ServerOptional的代码。如果你使用这个检测OVRService是否可用,可定期调用ovr_Initialize或者轮询ovr_Detect来代替。
  4. 移除ovr_ConfigureTracking的调用,SDK默认启用所有现有的追踪特性。
  5. 在ovrLayerType_EyeFov 层,当ovr_GetTrackingState在同一个frame被调用并且就在生成视野矩阵渲染双眼结构之前调用,用捕获时间戳来填充传感器。

原文如下


Overview of the SDK

The Oculus SDK 0.8 release changes the SDK from an HMD-based model to a session-based model and adds several new features.

Changes in the SDK

This section describes changes to the SDK.

New Features

The following are new features for the Oculus SDK and runtime:

  • Improved support for Windows 10.
  • Added ovr_GetSessionStatus, which returns whether the headset is present and whether it has VR
    focus and can render to the headset.
  • Added ovr_Detect to OVR_CAPI_Util.h, which enables you to detect the presence of a headset without initializing LibOVR. This can be useful when a game has VR and non-VR modes.
  • Added HandStatusFlags to ovrTrackingState, which specifies whether the the Oculus Touch controllers are being tracked. Status includes orientation and position.
  • Added SensorSampleTime to ovrLayerEyeFov, which specifies when the render pose was calculated. This is useful for measuring application tracking latency.
  • Added ovr_GetTrackingCaps to get the tracking capabilities of the device.
  • Usage of ovr_ConfigureTracking is no longer needed unless you want to disable tracking features. By default, ovr_Create enables the full tracking capabilities supported by any given device.
  • Added ovrLayerHudMode, which enables the headset user to see information about a layer.
  • Added ovrControllerType_None and ovrControllerType_XBox to ovrControllerType.
  • The Oculus Debug Tool was added to simplify troubleshooting. For more information see Oculus Debug Tool.

Runtime Changes

Changes include:

  • If you have an NVIDIA GPU, make sure to upgrade to the 358.70 driver or later. To get the driver, go to https://developer.nvidia.com/gameworks-vr-driver-support.
  • If you have an AMD GPU, we recommend the Catalyst 15.10 Beta or later. To get the driver, go to http://support.amd.com/en-us/kb-articles/Pages/latest-catalyst-windows-beta.aspx.

API Changes

This release represents a major revision of the API. Changes to the API include:

  • Applications no longer need to call ovr_ConfigureTracking. ovr_Create automatically enables the full tracking capabilities supported by any given device.
  • Replaced ovr_GetFrameTiming with ovr_GetPredictedDisplayTime.
  • Added latencyMarker to ovrTrackingState. When set to ovrTrue, this indicates that it will be used in the rendering loop and will be used to calculate latency.
  • To emphasize the session model, renamed ovrHmd to ovrSession and hmd to session.
  • ovrLayerType_QuadInWorld and ovrLayerType_QuadHeadLocked were renamed to ovrLayerType_Quad and are now differentiated by the ovrLayerFlag_HeadLocked flag.
  • Added ovrMaxLayerCount, which sets the maximum number of layers to 32.
  • Removed ovrInit_ServerOptional. If you use this to detect whether the OVRService is available, periodically call ovr_Initialize or poll ovr_Detect instead.
  • Removed ovrTrackingCap_Idle from ovrTrackingCaps.

Known Issues

The following are known issues:

  • The Oculus service might crash when gathering diagnostic logs from the Oculus Config Util. If this happens, the service will automatically restart and the logs will be retained.
  • The Oculus service and Config Util might hang when running the demo scene and another VR app at the same time”

Migrating from SDK 0.7.x to SDK 0.8

To migrate:

  1. Update calls to ovr_GetFrameTiming with ovr_GetPredictedDisplayTime using the new syntax.
  2. Update instances of ovrHmd hmd to ovrSession session.
  3. Remove any code that uses ovrInit_ServerOptional. If you use this to detect whether the OVRService is available, periodically call ovr_Initialize or poll ovr_Detect instead.
  4. Remove calls to ovr_ConfigureTracking as the SDK enables all existing tracking features by default.
  5. For ovrLayerType_EyeFov layers, fill in the SensorSampleTime with timestamps captured when ovr_GetTrackingState is being called in the same frame just before generating the view matrix to render the two eye textures.
0 0
原创粉丝点击