DirectX 中的共用體驗Shared experiences in DirectX

注意

本文與舊版 WinRT 原生 Api 相關。This article relates to the legacy WinRT native APIs. 針對新的原生應用程式專案,建議使用 OPENXR APIFor new native app projects, we recommend using the OpenXR API.

共用的體驗就是有多個使用者擁有自己的 HoloLens、iOS 或 Android 裝置,並共同查看相同的全像影像並與其互動。A shared experience is one where multiple users with their own HoloLens, iOS, or Android device, collectively view and interact with the same hologram. 您可以使用空間錨點共用,在空間中的固定點放置全像影像。The hologram is positioned at a fixed point in space using spatial anchor sharing.

Azure Spatial AnchorsAzure Spatial Anchors

您可以使用 Azure 空間錨點 來建立持久的雲端支援空間錨點,讓您的應用程式可在多個 HoloLens、IOS 和 Android 裝置上找到。You can use Azure Spatial Anchors to create durable cloud-backed spatial anchors, which your app can then locate across multiple HoloLens, iOS and Android devices. 藉由在多個裝置上共用一般空間錨點,每個使用者都可以在相同的實體位置中看到相對於該錨點轉譯的內容。By sharing a common spatial anchor across multiple devices, each user can see content rendered relative to that anchor in the same physical location. 這可提供即時共用體驗。This allows for real-time shared experiences.

您也可以使用 Azure 空間錨點 ,在 HoloLens、IOS 和 Android 裝置上進行非同步全像保存。You can also use Azure Spatial Anchors for asynchronous hologram persistence across HoloLens, iOS, and Android devices. 藉由共用長期雲端空間錨點,即使這些裝置不會同時存在,多個裝置也可以觀察經過一段時間的相同保存全息圖。By sharing a durable cloud spatial anchor, multiple devices can observe the same persisted hologram over time, even if those devices aren't present together at the same time.

若要開始在您的 HoloLens 應用程式中建立共用體驗,請嘗試5分鐘的 Azure 空間錨點 HoloLens 快速入門To get started building shared experiences in your HoloLens app, try out the 5-minute Azure Spatial Anchors HoloLens quickstart.

當您啟動並執行 Azure 空間錨點之後,您就可以 在 HoloLens 上建立並找出錨點Once you're up and running with Azure Spatial Anchors, you can then create and locate anchors on HoloLens. 適用于 Android 和 iOS 的逐步解說也可讓您在所有裝置上共用相同的錨點。Walkthroughs are available for Android and iOS as well, enabling you to share the same anchors on all devices.

本機錨點傳送Local anchor transfers

在您無法使用 Azure 空間錨點的情況下, 本機錨點轉移 可讓一部 hololens 裝置匯出錨點,以供第二個 hololens 裝置匯入。In situations where you can't use Azure Spatial Anchors, local anchor transfers enable one HoloLens device to export an anchor to be imported by a second HoloLens device. 這種方法可提供比 Azure 空間錨點更便宜的錨點召回,且此方法不支援 iOS 和 Android 裝置。This approach provides less robust anchor recall than Azure Spatial Anchors, and iOS and Android devices are not supported by this approach.

另請參閱See also