具有多个用户的 ARKit [英] ARKit with multiple users

查看:33
本文介绍了具有多个用户的 ARKit的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在多个用户/设备上使用 Apple 新的 ARKit 的最佳方式是什么(如果有的话)?

What is the best way, if any, to use Apple's new ARKit with multiple users/devices?

似乎每个设备都有自己的场景理解.到目前为止,我最好的猜测是使用原始特征点位置并尝试将它们跨设备匹配以将不同的观点粘合在一起,因为 ARKit 不提供任何绝对参考.

It seems that each devices gets its own scene understanding individually. My best guess so far is to use raw features points positions and try to match them across devices to glue together the different points of views since ARKit doesn't offer any absolute referential reference.

===Edit1,我尝试过的东西===

===Edit1, Things I've tried===

1) 特征点

我已经尝试过并处理了暴露的原始特征点,现在我确信在它们目前的状态下它们是死胡同:

I've played around and with the exposed raw features points and I'm now convinced that in their current state they are a dead end:

  • 它们不是原始特征点,它们只公开位置,但没有通常在跟踪特征点中发现的属性
  • 它们的实例化不会从一帧转移到另一帧,位置也不完全相同
  • 当相机输入几乎没有变化时,报告的特征点经常发生很大变化,要么出现要么消失.

所以总的来说,我认为尝试以某种有意义的方式使用它们是不合理的,不能在一个设备中进行任何类型的好的点匹配,更不用说几个了.另一种方法是实现我自己的特征点检测和匹配,但这与其说是利用 ARKit,不如说是替代 ARKit.

So overall I think it's unreasonable to try to use them in some meaningful way, not being able to make any kind of good point matching within one device, let alone several. Alternative would to implement my own feature point detection and matching, but that'd be more replacing ARKit than leveraging it.

2) 二维码

正如@Rickster 所建议的那样,我还尝试识别一个易于识别的对象,例如二维码,并从该固定点获取相对参考更改(请参阅 这个问题) 这有点困难,暗示我使用一些 openCV 来估计相机姿势.但更重要的是非常有限

As @Rickster suggested, I've also tried identifying an easily identifiable object like a QR code and getting the relative referential change from that fixed point (see this question) It's a bit difficult and implied me using some openCV to estimate camera pose. But more importantly very limiting

推荐答案

现在,在 WWDC 2018 上发布 ARKit 2.0 后,可以为 2 到 6 个用户制作游戏.

Now, after releasing ARKit 2.0 at WWDC 2018, it's possible to make games for 2 to 6 users.

为此,您需要使用 ARWorldMap 类.通过保存世界地图并使用它们开始新的会话,您的 iOS 应用程序现在可以添加新的增强现实功能:多用户和持久的 AR 体验.

For this you need to use ARWorldMap class. By saving world maps and using them to start new sessions, your iOS application can now add new Augmented Reality capabilities: multiuser and persistent AR experiences.

AR 多用户体验.现在,您可以通过将存档的 ARWorldMap 对象发送到附近的 iPhone 或 iPad 来创建参考的共享框架.通过多个设备同时跟踪同一个世界地图,您可以构建一种体验,所有用户(最多 6 个)都可以共享和查看相同的虚拟 3D 内容(使用全新的 Pixar USDZcode> Xcode 10 和 iOS 12 中的 3D 文件格式).

AR Multiuser experiences. Now you may create a shared frame of a reference by sending archived ARWorldMap objects to a nearby iPhone or iPad. With several devices simultaneously tracking the same world map, you may build an experience where all users (up to 6) can share and see the same virtual 3D content (use brand new Pixar's USDZ file format for 3D in Xcode 10 and iOS 12).

session.getCurrentWorldMap { worldMap, error in 
    guard let worldMap = worldMap else {
        showAlert(error)
        return
    }
}

let configuration = ARWorldTrackingConfiguration()
configuration.initialWorldMap = worldMap
session.run(configuration)

AR 持久体验.如果您保存了一个世界地图,然后您的 iOS 应用程序变为非活动状态,您可以在下次启动应用程序时在相同的物理环境中轻松恢复它.您可以使用恢复的 世界地图 中的 ARAnchors 将相同的虚拟 3D 内容(以 USDZ 或 DAE 格式)放置在与之前保存的会话相同的位置.

AR Persistent experiences. If you save a world map and then your iOS application becomes inactive, you can easily restore it in the next launch of app and in the same physical environment. You can use ARAnchors from the resumed world map to place the same virtual 3D content (in USDZ or DAE format) at the same positions from the previous saved session.

这篇关于具有多个用户的 ARKit的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆