• Guides
    • English
    • 日本語
  • API Documentation
  • 機能概要
  • Spatial Awareness System (空間認識システム)
  • Spatial Observers
  • Configuring Observers for Editor

    Show / Hide Table of Contents
    • MRTK を始める
      • Release Notes
      • MRTK Package Contents
      • Updating from earlier versions
      • HTK からの移植ガイド
      • MRTK のビルドとデプロイ
      • NuGet Packages
      • Getting started with MRTK and XR SDK
      • Performance
      • Hologram Stabilization (ホログラムの安定化)
    • アーキテクチャ
      • 全体像
      • フレームワークとランタイム
      • Input System (入力システム)
        • 用語
        • Core System
        • Controllers, Pointers, and Focus
      • Systems, Extension Services and Data Providers
    • 機能概要
      • Boundary System
        • Boundary System Overview
        • Configuring the Boundary Visualization
      • Camera System
        • Camera System Overview
        • Camera Settings Providers
          • Windows Mixed Reality Camera Settings
          • Unity AR Camera Settings [Experimental]
          • Creating a camera settings provider
      • Cross Platform Support
        • Configure MRTK for iOS and Android
      • プラットフォームの Capabilities (機能) を検出する
      • Diagnostics System (診断システム)
        • 診断システムの概要
        • 診断システムの構成
        • ビジュアル プロファイラーを使用する
      • Extension Services
        • Extension Service Creation Wizard
        • Scene Transition Service Overview
        • Hand Physics Service Overview
      • Input System (入力システム)
        • 入力の概要
        • Input Actions
        • Input Events
        • Input Providers
          • Input Providers Overview
          • Creating an input data provider
        • Controllers (コントローラー)
        • Eyes
        • Gaze (ゲイズ)
        • Gestures (ジェスチャ)
        • Hands
        • How to Add Near Interaction
        • エディター内入力シミュレーション
        • Pointers
        • Voice Input
          • Dictation (ディクテーション)
          • Speech (コマンドとコントロール)
      • Multi Scene System
        • Multi Scene System Overview
        • Scene Types
        • Content Scene Loading
        • Monitoring Content Loading
        • Lighting Scene Operations
      • パッケージ
        • MRTK パッケージ
        • MRTK Modularization
      • Profiles (プロファイル)
        • プロファイル概要
        • 設定ガイド
      • Rendering
        • Material Instance Overview
        • Shaders
          • MRTK Standard Shader
      • Services (サービス)
        • What makes a mixed reality feature
        • MixedRealityServiceRegistry と IMixedRealityServiceRegistrar とは何か
        • Extension services
      • Spatial Awareness System (空間認識システム)
        • Spatial Awareness (空間認識) 概要
        • Spatial Observers
          • Configuring Observers for Device
          • Configuring Observers for Editor
          • Controlling Observers via Code
          • Creating a custom Observer
      • Teleport System (テレポートシステム) 概要
      • ツール
        • Dependency Window (依存関係ウィンドウ)
        • Extension Service Creation Wizard
        • Holographic Remoting
        • Input Animation Recording
          • Input Animation File Format Specification
        • Optimize Window
        • Runtime tools
          • Controller Mapping tool
      • UX ビルディング ブロック
        • Interactable (インタラクタブル)
        • Button (ボタン)
        • Bounding Box
        • Object Manipulation (物体操作)
        • Sliders (スライダー)
        • Fingertip Visualization
        • App Bar
        • Object Collection (オブジェクトコレクション)
        • Slate (スレート)
        • System Keyboard (システム キーボード)
        • Tooltips (ツールチップ)
        • Solvers (ソルバー)
      • Example Scenes
        • Examples Hub
        • ハンド インタラクションのサンプル
        • アイ トラッキング インタラクションのサンプル
      • Experimental
        • Scrolling Object Collection
        • Hand Coach UX
        • Pulse Shader
    • Contributing
      • Contributing Overview
      • Coding Guidelines
      • Writing and Running Tests
      • Writing Documentation
      • Pull Requests
      • Experimental Features
      • Breaking Changes
      • How to use DocFX
    • Planning
      • Roadmap
    • Notice
    • Authors

    Configuring mesh observers for the editor

    A convenient way to provide environment mesh data in the Unity editor is to use the SpatialObjectMeshObserver class. The Spatial Object Mesh Observer is an editor-only data provider for the Spatial Awareness system that enables importing 3D model data to represent a spatial mesh. One common use of the Spatial Object Mesh Observer is to import data scanned via a Microsoft HoloLens to test how an experience adapts to different environments from within Unity.

    Getting started

    This guide will walk through setting up a Spatial Object Mesh Observer. There are three key steps to enable this feature.

    1. Add a Spatial Object Mesh Observer to the Spatial Awareness system profile
    2. Set the Environment Mesh Data object
    3. Configure rest of the Mesh Observer profile properties

    Set up a spatial object mesh observer profile

    1. Select the desired Mixed Reality Toolkit configuration profile or select the Mixed Reality Toolkit object in scene

    2. Open or expand the Spatial Awareness System tab

    3. Click on "Add Spatial Observer" button

      Add Spatial Observer

    4. Select the SpatialObjectMeshObserver type

      Select Spatial Object Mesh Observer

    5. Select the desired Spatial Mesh Object. By default, the observer is configured with an example model. This model was created using a Microsoft HoloLens but it is possible to create a new scan mesh object.

    6. Configure rest of the Mesh Observer profile properties

      Select the Mesh Object

    Spatial object mesh observer profile notes

    Since the Spatial Object Mesh Observer loads data from a 3D model, it does not honor some of the standard mesh observer settings which are outlined below.

    Update Interval

    The Spatial Object Mesh Observer sends all meshes to an application when the model is loaded. It does not simulate time deltas between updates. An application can re-receive the mesh events by calling myObserver.ClearObservation() and myObserver.Resume().

    Is Stationary Observer

    The Spatial Object Mesh Observer considers all 3D mesh objects to be stationary and disregards origin.

    Observer Shape and Extents

    The Spatial Object Mesh Observer sends the entire 3D mesh to the application. Observer shape and extents are not considered.

    Level of Detail and Triangles / Cubic Meter

    The Observer does not attempt to find 3D model LODs when sending the meshes to the application.

    Acquiring environment scans

    This section outlines additional information to create and gather Spatial Mesh Object files for use with the Spatial Object Mesh Observer.

    Windows Device Portal

    The Windows Device Portal can be used to download the spatial mesh, as a .obj file, from a Microsoft HoloLens device.

    1. Scan by simply walking and viewing the desired environment with a HoloLens
    2. Connect to the HoloLens using the Windows Device Portal
    3. Navigate to the 3D View page
    4. Click the Update button under Spatial Mapping section
    5. Click the Save button under Spatial Mapping section to save the obj file to PC
    Note

    HoloToolkit .room files

    Many developers will have previously used HoloToolkit to scan environments and create .room files. The Mixed Reality Toolkit now supports importing these files as GameObjects in Unity and use them as Spatial Mesh Objects in the observer.

    See also

    • Profiles
    • Mixed Reality Toolkit Profile configuration guide
    • Spatial Awareness Getting started
    • Configuring Mesh Observers on Device
    • Configuring Mesh Observers via code
    • Using the Windows Device Portal
    • Improve this Doc
    In This Article
    • Getting started
      • Set up a spatial object mesh observer profile
      • Spatial object mesh observer profile notes
    • Acquiring environment scans
      • Windows Device Portal
    • See also
    Back to top Generated by DocFX