VR系列——Oculus Mobile SDK文档:一、Mobile SDK的介绍

Mobile SDK的介绍

欢迎进行Gear VR移动应用开发。
这篇指南提供了开发所需的SDK内容及细节的概述。

入门

准备好开始开发了吗?

移动端SDK安装指南指导你一次性地准备和配置你的开发环境。
这有编辑好的建议,用于开发、调试以及分析VR应用,推荐给所有开发者:

  • 移动VR应用开发指南
  • Android调试
  • 性能分析

Unity和Unreal的开发者

作为安装指导,请一定回顾移动端SDK安装指南的Unity和Unreal开发者的移动端安装章节。Unity的开发者应该关注我们的Unity实用方法文档(Unity 5.1+)或Unity遗留集成文档(Unity 4.6+),这些在我们的网站上可以找到:https://developer.oculus.com/documentation/

本地开发者

一旦你完成了安装指南中描述的安装过程,请关注本地开发指南。

应用提交

关于准备通过Oculus Store提交移动VR应用到Oculus的相关信息,参见发布指南。
感谢你们加入我们的虚拟现实!

有疑问?

访问我们的开发者支持论坛https://developer.oculus.com
也可以通过这个地址访问我们的支持中https://support.oculus.com/

系统和硬件要求

开始开发时,请先确保你使用的是这个版本的Oculus移动SDK所支持的硬件和设备。

操作系统要求

Oculus移动SDK目前支持以下操作系统:

  • Windows 7 或 8
  • Mac OS: 10.6+ (只支持x86)

最低系统要求

以下是基于Android SDK系统的Oculus移动SDK对计算机系统的要求:

  • 2.0+ GHz 处理器
  • 2 GB 系统 RAM

支持的VR头显

  • Samsung Gear VR

支持的设备

  • Samsung Note 4
  • Samsung Note 5
  • Samsung Galaxy S6
  • Samsung Galaxy S6 Edge
  • Samsung Galaxy S6 Edge+

目标设备的要求

  • 级别19的API (Android 4.4.2) 或更新的版本

配件

蓝牙游戏手柄

我们推荐使用合适的蓝牙游戏手柄进行开发,例如SteelSeries Free或Moga Pro。游戏手柄对测试使用该版本开发的示例应用,是很有必要的。

一个合适的游戏手柄必须有以下的特点:

  • 无线蓝牙连接 (BT3.0)
  • 与Android设备兼容
  • 有开启和选择按钮

典型的控制,包括:

  • 一个模拟棒
  • 动作按钮(4)
  • 触发按钮(2)
蓝牙键盘(可选)

在开发过程中有一个蓝牙键盘是很有用的(但非必选)。(推荐:)罗技K810是公认很好用的。

应用程序签名

Oculus移动app在不同的发展阶段需要两个不同的签名。

  • Oculus的签名文件(开发过程中需要的,提交时移除)
  • Android应用程序签名(提交时需要)

Oculus的签名文件(osig)

在开发过程中, 你的应用必须用一个Oculus-issued(Oculus发布的) Oculus签名文件或osig,来签名。签名是以一个文件(你包含在你的应用中为了在你的移动设备上访问低等级的VR功能)的形式。每个签名绑定到一个指定的设备,所以你需要为每一个你用来开发的设备生成osig文件。当你的应用提交时或审核时,Oculus会修改APK让它能用在所有设备上。

请看我们osig自服务入口获取更多信息和说明关于怎样为开发请求一个osig:https://developer.oculus.com/tools/osig/

安卓应用程序签名

安卓使用一个数字证书(也称为密钥)加密验证应用程序的作者身份。所有安卓应用必须用一个数字签名证书,以确保在安卓设备上安装和运行。

在提交应用到Oculus审核之前,所有开发者必须建立他们自己唯一的数字签名并签好他们的应用。更多信息和说明,请参阅安卓的“对你的应用签名”文档:http://developer.android.com/tools/publishing/app-signing.html

请确定保存你用来对你的应用签名的证书文件。后续每次你应用的更新必须用相同的证书文件签名,否则更新将失败。

注:你的应用程序在提交前必须通过安卓证书签名。

安卓应用签名和Unity

Unity默认自动用一个临时的调试证书签名安卓应用。在构建你的最终发布版本之前,创建一个新的安卓密钥存储库,并使用Use Existing Keystore选项指定它,在Edit->Project Settings->Player->Publishing Options路径。更多信息,请参见Unity文件中“安卓”篇的文档:http://docs.unity3d.com/Manual/class-PlayerSettings.html

SDK内容

包含此SDK,你会发现以下内容:

  • 构建高性能VR应用的原生框架。
  • 示例原生和Unity工程源码提供一个创建你自己的VR应用模式
  • 预构建的示例应用程序,一些用原生实现和一些用Unity实现
  • 原生开发工具助手

Unity资源

Oculus实用程序对Unity和集成包是可用的,可独立下载,下载页面地址:https://developer.oculus.com/downloads/

在Unity4上,Unity示例包括移动SDK都只兼容现有的Oculus集成包。如果你在Unity5.1或更高版本使用的是Unity的第一方VR支持,你会发现下载示例和我们使用程序包是兼容的,也在Oculus的下载页面。

更多的Oculus移动SDK示例内容,请看我们的Unity文档。

应用和媒体示例

注:SDK包含的示例应用作为一个便利提供给开发。有些应用程序和从Oculus商店下载的应用程序是相似的。由于会有版本冲突的潜在可能性,如果你已经安装了你自己的零售GearVR体验,我们不推荐运行这些示例app在同一设备上。如果你使用三星Note4,请注意捆绑SM-R320零售媒体内容的安全性。如果没有更换的可能性,它将是困难的。


表1:原生应用实例

应用描述
这里写图片描述全景照片阅读器。
这里写图片描述全景视频播放器
这里写图片描述在虚拟影院中播放2D或3D电影
这里写图片描述彩色立方体的示例场景


表2:Unity应用示例

应用描述
这里写图片描述一个用方块打翻结构和收集星星的简单游戏例子(资源和APK,目前只有Unity4支持)
这里写图片描述通过狂指游戏(Madfinger Games)的暗影之枪(Shadowgun)中渲染场景和人物的示例应用

对于移动应用,我们在预加载媒体有限制。请通过下面表和兼容性媒体创建指南添加你自己的媒体:


表3:示例媒体

应用媒体的SD卡路径
Oculus Cinema - 2D Movie
(Oculus相机 - 2D电影)
Movies\DCIM\Oculus\Movies\My Videos
Oculus Cinema - 3D Movie
(Oculus相机 - 3D电影)
Movies\3D\DCIM\3D\Oculus\Movies\My Videos\3D\
Oculus 360 Video - 360-degree panoramic video
(Oculus 360视频 - 360度全景视频)
Oculus\360Videos\
Oculus 360 Photo - 360-degree static photos
(Oculus 360相片 - 360度静态照片)
Oculus\360Photos\

注:非360度照片不合适渲染。

更多的媒体管理信息,请看移动媒介VR概览。Mobile Media VR Overview(第51页Mobile VR Media Overview)


原文如下


Introduction to the Mobile SDK

Welcome to mobile application development for Gear VR!
This guide provides an overview of the SDK contents and details the requirements for development.

Getting Started

Ready to start developing?

The Mobile SDK Setup Guide is a one-time guide to preparing and configuring your development environment.

We have compiled recommendations for developing, debugging, and analyzing VR applications that we recommend to all developers:

  • Mobile VR Application Development Guide
  • Android Debugging
  • Performance Analysis

Unity and Unreal Developers

For setup instructions, be sure to review the Mobile Setup for Unity and Unreal Developers section of the Mobile SDK Setup Guide. Unity developers should then focus on our Utilities for Unity documentation (Unity 5.1+) or Unity Legacy Integration documentation (Unity 4.6+), available on our documentation site: https://developer.oculus.com/documentation/

Native Developers

Once you have completed the setup process described by the Setup Guide, focus on the Native Development Guide.

Application Submission

For information on preparing to submit your mobile VR application to Oculus for distribution through the Oculus Store, see our Publishing Guide.

Thank you for joining us at the forefront of virtual reality!

Questions?

Visit our developer support forums at https://developer.oculus.com.

Our Support Center can be accessed at https://support.oculus.com/

System and Hardware Requirements

Please begin by making sure that you are using supported hardware and devices for this release of the Oculus Mobile SDK.

Operating System Requirements

The Oculus Mobile SDK currently supports the following operating systems:

  • Windows 7 or 8
  • Mac OS: 10.6+ (x86 only)

Minimum System Requirements

The following computer system requirements for the Oculus Mobile SDK are based on the Android SDK system requirements:

  • 2.0+ GHz processor
  • 2 GB system RAM

Supported VR Headsets

  • Samsung Gear VR

Supported Devices

  • Samsung Note 4
  • Samsung Note 5
  • Samsung Galaxy S6
  • Samsung Galaxy S6 Edge
  • Samsung Galaxy S6 Edge+

Target Device Requirements

  • API Level 19 (Android 4.4.2) or later

Accessories

Bluetooth Gamepad

We recommend using a compatible Bluetooth gamepad for development, such as the SteelSeries Free or Moga Pro. A gamepad is necessary for testing the sample applications which come with this release.

Compatible gamepads must have the following features:

  • Wireless Bluetooth connection (BT3.0)
  • Compatible with Android devices
  • Start and Select buttons

Typical controls include:

  • One Analog Stick
  • Action Button (4)
  • Trigger Button (2)
Bluetooth Keyboard (optional)

It is useful (but not required) to have a Bluetooth keyboard during development. The Logitech K810 is known to function well.

Application Signing

Oculus mobile apps require two distinct signatures at different stages of development.

  • Oculus Signature File (required during development, remove for submission)
  • Android Application Signature (required for submission)

Oculus Signature File (osig)

During development, your application must be signed with an Oculus-issued Oculus Signature File, or osig. This signature comes in the form of a file that you include in your application in order to access protected lowlevel VR functionality on your mobile device. Each signature file is tied to a specific device, so you will need to generate osig files for each device that you use for development. When your application is submitted and approved, Oculus will modify the APK so that it can be used on all devices.

Please see our osig self-service portal for more information and instructions on how to request an osig for development: https://developer.oculus.com/tools/osig/

Android Application Signing

Android uses a digital certificate (also called a keystore) to cryptographically validate the identity of application authors. All Android applications must be digitally signed with such a certificate in order to be installed and run on an Android device.

All developers must create their own unique digital signature and sign their applications before submitting them to Oculus for approval. For more information and instructions, please see Android’s “Signing your Applications” documentation: http://developer.android.com/tools/publishing/app-signing.html

Make sure to save the certificate file you use to sign your application. Every subsequent update to your application must be signed with the same certificate file, or it will fail.

Note: Your application must be signed by an Android certificate before you submit it.

Android Application Signing and Unity

Unity automatically signs Android applications with a temporary debug certificate by default. Before building your final release build, create a new Android keystore and assign it with the Use Existing Keystore option, found in Edit > Project Settings > Player > Publishing Options. For more information, see the “Android” section of Unity’s documentation here: http://docs.unity3d.com/Manual/class-PlayerSettings.html.

SDK Contents

Included with this SDK, you will find the following:

  • Native framework for building high-performance VR Applications.
  • Example native and Unity Projects with source to provide a model for creating your own VR applications.
  • Pre-built sample applications, some implemented in native and some in Unity.
  • Tools to assist with native development.

Unity Resources

The Oculus Utilities for Unity and Legacy Integration packages are available for download separately at our downloads page here: https://developer.oculus.com/downloads.

The Unity samples included with the Mobile SDK are compatible with the Oculus Legacy Integration package only, for use with Unity 4. If you are using Unity’s first-party VR support in Unity 5.1 or later, you will find samples compatible with our Utilities package available for download, also at our downloads page.

For more information on the Oculus Mobile SDK Example contents, please see our Unity documentation.

Sample Applications and Media

Note: The sample applications included with the SDK are provided as a convenience for development purposes. Some of these apps are similar to apps available for download from the Oculus Store. Due to the potential for conflict with these versions, we do not recommend running these sample apps on the same device on which you have installed your retail Gear VR Innovator experience. If you are using the Samsung Note 4, please take care to secure the retail media content bundled with the SM-R320. It will be difficult if not impossible to replace.


Table 1: Sample Native Applications

ApplicationDescription
这里写图片描述A viewer for panoramic stills.
这里写图片描述A viewer for panoramic videos.
这里写图片描述Plays 2D and 3D movies in a virtual movie theatre.
这里写图片描述A sample scene of colorful cubes.


Table 2: Sample Unity Applications

ApplicationDescription
这里写图片描述A simple game example in which blocks can be thrown to knock over structures and collect stars. (source and APK, currently Unity 4 only)
这里写图片描述An example app that renders a scene and character from Shadowgun by Madfinger Games. (APK)

For the Mobile SDK, we have limited pre-loaded media. Please add your own media by consulting the following table and media creation guidelines for compatibility:


Table 3: Sample Media

ApplicationPath for Media on the SD Card
Oculus Cinema - 2D MovieMovies\DCIM\Oculus\Movies\My Videos
Oculus Cinema - 3D MovieMovies\3D\DCIM\3D\Oculus\Movies\My Videos\3D\
Oculus 360 Video - 360-degree panoramic videoOculus\360Videos\
Oculus 360 Photo - 360-degree static photosOculus\360Photos\

Note: Non-360 degree photos will not render properly.

For more information on media management, see Mobile Media VR Overview.

  • 1
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值