vr全景接口_制作面向业务的VR接口

vr全景接口

You would think that building a relatively simple VR Interface in Unity would be “Out of the Box” sort of work.

您可能会认为,在Unity中构建相对简单的VR接口将是“开箱即用”的工作。

Sadly, with a confused and confusing architecture, you are going to have to do much more work than you expected.

可悲的是,对于一个混乱而混乱的体系结构,您将不得不做比预期更多的工作。

背景 (Background)

Although I have no games development background, I recently started on a project to develop a business-oriented and data-oriented Virtual Reality application in Unity. More details about the project should be coming soon.

尽管我没有游戏开发背景,但是我最近开始了一个项目,该项目在Unity中开发面向业务和面向数据的虚拟现实应用程序。 有关该项目的更多详细信息应尽快推出。

As an experienced architect and developer coming new into the VR and Unity world, I want to cast some light onto the way to create a solution and hopefully help someone avoid the traps I have explored.

作为一个经验丰富的架构师和开发人员,我刚进入VR和Unity世界时,我想为创建解决方案提供一些启发,并希望帮助某人避免我探索的陷阱。

One note. I have noticed that many articles about Unity tend to start with the obvious about how to install it and then, at the critical point just say something equivalent to “then reverse polarity in the transduction mode of the matter curve”- without any explanation of what this means or, indeed, what to do with the matter curve if you don’t want the polarity reversed! I intend to assume the obvious and discourse more on the transduction mode. I hope I am successful.

一注。 我已经注意到,许多关于Unity的文章倾向于从关于如何安装Unity的显而易见的内容开始,然后在关键时刻只说了相当于“然后在物质曲线的转换模式下反转极性”的内容-对此没有任何解释。这意味着,或者实际上,如果您不希望极性反转,该如何处理物质曲线! 我打算在转导模式上承担更多显而易见的话题。 我希望我能成功。

There may be better solutions than we came up with. I am claiming to be far from an expert and I would love to hear about them: but the architecture is convoluted and the documentation is pretty much “ineffable”, so this path is the best that I could find.

可能有比我们想出的更好的解决方案。 我声称自己与专家相去甚远,我很想听听他们的意见:但是架构令人费解,文档几乎“无法解释”,所以这条路是我能找到的最好方法。

At the end, I give my views on what I wish this experience had been like and how the architecture should be managed.

最后,我对我希望这种经历是什么样的以及应该如何管理体系结构发表自己的看法。

目标 (Objectives)

First, lets lay down some objectives. We want to be able to explore in VR a data space and, in that space, to use Menus and interact with data entities using a typical ‘laser-pointer’ tool. That is all.

首先,让我们设定一些目标。 我们希望能够在VR中探索数据空间,并在该空间中使用菜单并使用典型的“激光指示器”工具与数据实体进行交互。 就这些。

We also want this to have a professional feel, so we don’t need any attempts at avatars or even hands (controller avatars are good enough) and we want good functionality in the menus, which should look like menus.

我们也希望它具有专业的感觉,因此我们不需要尝试任何化身甚至动手(控制器化身就足够了),并且我们希望菜单中的功能良好,应该看起来像菜单。

We also want this to be maintainable and so want to avoid technical debt and of course, we want to try to avoid reinventing everything to reduce the support load.

我们也希望这是可维护的,因此希望避免技术负担,当然,我们希望避免重新发明一切以减少支持负荷。

Let’s also for the time being that we want to work on Oculus only. But not close any doors to the future.

暂时让我们只想在Oculus上工作。 但没有关闭任何未来的大门。

起步 (Starting Out)

At first, everything seemed good.

起初,一切似乎都很好。

Core Unity provides a GameObject structure that can quite easily represent a spatial entity model (I hope to talk more about this in another article) along with the ability to create an application core using C# and C++.

Core Unity提供了一个GameObject结构,可以很容易地表示一个空间实体模型(我希望在另一篇文章中有更多介绍),以及使用C#和C ++创建应用程序核心的能力。

Looking at the Interface and Interaction model, you would think:

查看接口和交互模型,您会认为:

  • Unity has rolled out new Scriptable Render Pipeline technology (URP and HDRP for normal quality and High Def respectively) and has hinted that the legacy pipelines will eventually be sunsetted. It is a no brainer to use the URP to avoid technical debt.

    Unity推出了新的可脚本化渲染管道技术(分别为正常质量和高清的URP和HDRP),并暗示传统管道最终将被淘汰。 使用URP来避免技术债务是毫无道理的。
  • Unity has rolled out a new unified Input System and has stated that the old Input Managers will be deprecated. So in that goes.

    Unity推出了新的统一输入系统,并声明将淘汰旧的输入管理器。 所以就这样。
  • Oculus has a good integration package for Unity including all of the required Prefabs. Oculus has more incentive than anyone else to keep the integration supported and up to date and they should have more access to and knowledge of the low-level configurations. It seems to make sense to use this, particularly for the “XR-Rig” that is the representation of the user in VR space (i.e. the eyes and hands in their relative positions).

    Oculus为Unity提供了一个很好的集成包,其中包括所有必需的Prefabs。 Oculus比其他任何人都有更多的动力来保持对集成的支持并保持最新,并且他们应该更多地访问和了解底层配置。 使用它似乎很有意义,尤其是对于“ XR-Rig”,它是用户在VR空间中的表示(即,眼睛和手在其相对位置)。
  • For the Interactions, Unity has an XR Interaction Toolkit that is supposed to provide everything you need to interact with entities in VR, include a laser pointer. This has also just been released, so less technical debt.

    对于交互,Unity具有XR交互工具包,该工具包应提供与VR中的实体进行交互所需的一切,包括激光指示器。 这也刚刚发布,因此技术债务更少。
  • Finally, Unity has a new UI providing a good set of UI entities for creating Menus both in screen space and in world space.

    最后,Unity有一个新的UI,提供了一组不错的UI实体,可用于在屏幕空间和世界空间中创建菜单。

All good, yes?

都很好,是吗?

啊,但是……! (Ah, but …!)

It turns out that, basically, you cannot!

事实证明,基本上,您不能!

The first part was to migrate to URP (no problems) and convert the project from the deprecated “Built-in XR” to the XR Plugin system. It is a little surprising that the former, although deprecated, seems to be still the default. Configuring the Oculus plugin involved some fiddling with versions but they will presumably have fixed the version problems in the next releases.

第一部分是迁移到URP(没有问题)并将项目从不建议使用的“内置XR”转换为XR插件系统。 令人惊讶的是,尽管已弃用了前者,但它似乎仍然是默认值。 配置Oculus插件会涉及一些版本问题,但是大概会在以后的版本中修复版本问题。

But :

但是:

  • The Oculus Utilities for Unity do indeed provide all that is needed to build a good OVR (i.e. Oculus VR ) Rig and plugins for Unity. The documentation is also quite good. However, OUU is not URP ready and only provides integration to the legacy Input Manager and not to the new Input System,

    实际上, 用于Unity的Oculus实用程序确实提供了为Unity构建良好的OVR(即Oculus VR)装备和插件所需的全部功能。 该文档也相当不错。 但是,OUU还没有URP就绪,只能提供与旧版Input Manager的集成,而不能与新的Input System集成,

  • The

你可能感兴趣的:(java,接口)