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

查看:116
本文介绍了具有多个用户的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)QR码

正如@Rickster所建议的,我还尝试了识别易于识别的对象(例如QR码),并从该固定点获取了相对参照更改(请参阅

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类.通过保存world maps并使用它们开始新的会话,您的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来创建参考的共享框架.使用多个设备同时跟踪相同的world map,您可以建立一种体验,所有用户(最多6个)可以共享并看到相同的虚拟3D内容(在Xcode 10和iOS中对3D使用全新的Pixar的USDZ文件格式) 12).

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持久体验.如果保存world map,然后iOS应用程序变为非活动状态,则可以在下次启动应用程序时和在同一物理环境中轻松还原它.您可以使用恢复的world map中的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天全站免登陆