You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The spatial swareness mesh observer profile provides options for configuring:
4
+
-[General Settings](#general-settings)
5
+
-[Physics Settings](#physics-settings)
6
+
-[Level of Detail Settings](#level-of-detail-settings)
7
+
-[Display Settings](#display-settings)
8
+
9
+
## General Settings
10
+
11
+

12
+
13
+
### Startup Behavior
14
+
15
+
The startup behavior specifies the behavior of the observer when it is first instantiated. The options are Auto Start and Manual Start. When set to Manual Start, applications will need to call one of the following IMixedRealitySpatialAwarenessSystem methods:
16
+
17
+
- ResumeObserver<T>(string name)
18
+
- ResumeObservers()
19
+
- ResumeObservers<T>()
20
+
21
+
The default value is Auto Start.
22
+
23
+
### Update Interval
24
+
25
+
The time, in seconds, between requests to the platform to update spatial mesh data. Typical values fall in the range of 0.1 and 5.0 seconds.
26
+
27
+
### Is Stationary Observer
28
+
29
+
Indicates whether or not the observer is to remain stationary or to move and update with the user.
30
+
31
+
> When stationary, if user moves further than the [Observation Extents](#observation-extents) away from the origin. In this instance, there would be no mesh data around the user until they moved closer to the origin.
32
+
33
+
### Observer Shape
34
+
35
+
The observer shape defines the type of volume that the mesh observer will use when observing meshes. The supported options are:
36
+
37
+
-[Axis Aligned Cube](#axis-aligned-cube)
38
+
-[User Aligned Cube](#user-aligned-cube)
39
+
- Sphere
40
+
41
+
#### Axis Aligned Cube
42
+
43
+
An axis aligned cube volume is a rectangular shape that stays aligned with the axes of the world coordinate system, as determened at application startup.
44
+
45
+
#### User Aligned Cube
46
+
47
+
A user aligned cube volume is a rectangular shape that rotates to align with the users local coordinate system.
48
+
49
+
### Observation Extents
50
+
51
+
The observation extents define the distance from the observation point that meshes will be observed. When the [Observer Shape](#observer-shape) is set to Sphere, the X value of the extents will be used as the radius of the sphere.
The physics layer specifies which layer on which the spatial mesh objects will be placed in order to interact with the Unity Physics and RayCast systems. The Mixed Reality Toolkit reserves layer 31 by default for use by Spatial Awareness observers.
60
+
61
+
#### Recalculate Normals
62
+
63
+
Specifies whether or not the mesh observer will recalculate the normals of the mesh following observation. This setting is available to ensure applications receive meshes that contain valid normals data on platforms that do not return them with meshes.
64
+
65
+
## Level of Detail Settings
66
+
67
+

68
+
69
+
### Level of Detail
70
+
71
+
Specifies the level of detail (LOD) of the spatial mesh data. Currently defined values are Coarse, Fine and Custom.
72
+
73
+
The Coarse LOD generally place a smaller impact on application performance and are an excellent choice for navigation and plane finding.
74
+
75
+
The Fine LOD generally exact a higher performance impact on application performance and are a great option for occlusion meshes.
76
+
77
+
The Custom LOD require the application to specify the [Triangles / Cubic Meter](#triangles-per-cubic-meter) value and allows applications to tune the accuracy vs. performance impact of the spatial mesh observer.
78
+
79
+
> Note: It is not guaranteed that all Triangles/Cubic Meter values are honored by all platforms. Experimentation and profiling is highlu recommended when using a custom LOD.
80
+
81
+
### Triangles per Cubic Meter
82
+
83
+
When using the Custom [Level of Detail](#level-of-detail), specifies the requested value for the triangle density for the spatial mesh.
Specifies how spatial meshes are to be displayed by the observer. Supported values are None, Visible and Occlusion. Setting Visible or Occlusion instructs the observer to select the appropriate material. Specifying None causes the observer to not render the mesh.
94
+
95
+
> Note: Setting Display Option to None does _not_ stop the observer from running. If you wish to stop the observer, applications will need to call one of the following IMixedRealitySpatialAwarenessSystem methods:
96
+
> - SuspendObserver<T>(string name)
97
+
> - SuspendObservers()
98
+
> - SuspendObservers<T>()
99
+
100
+
### Visible Material
101
+
102
+
Indicates the material to be used when visualizing the spatial mesh.
103
+
104
+
### Occlusion Material
105
+
106
+
Indicates the material to be used to cause the spatial mesh to occlude holograms.
107
+
108
+
## See Also
109
+
110
+
-[IMixedRealitySpatialAwarenessObserver API documentation](xref:Microsoft.MixedReality.Toolkit.SpatialAwareness.IMixedRealitySpatialAwarenessObserver)
111
+
-[IMixedRealitySpatialAwarenessMeshObserver API documentation](xref:Microsoft.MixedReality.Toolkit.SpatialAwareness.IMixedRealitySpatialAwarenessMeshObserver)
112
+
-[BaseSpatialObserver API documentation](xref:Microsoft.MixedReality.Toolkit.SpatialAwareness.BaseSpatialObserver)
The Spatial Awareness system provides real-world environmental awareness in mixed reality applications. When introduced on Microsoft HoloLens, spatial awareness provided a collection of meshes, representing the geometry of the environment, which allowed for compelling interactions between holograms and the real-world.
3
+
The Spatial Awareness system provides real-world environmental awareness in mixed reality
4
+
applications. When introduced on Microsoft HoloLens, spatial awareness provided a collection
5
+
of meshes, representing the geometry of the environment, which allowed for compelling interactions
6
+
between holograms and the real-world.
4
7
5
8
## Getting Started
6
9
7
-
Adding support for spatial awareness requires two key components of the Mixed Reality Toolkit; the spatial awareness system and a supported platform provider.
10
+
Adding support for spatial awareness requires two key components of the Mixed Reality Toolkit; the
11
+
spatial awareness system and a supported platform provider.
8
12
9
13
1.[Enable](enable-spatial-awareness) the spatial awareness system
10
14
2.[Register](register-observers) and [configure](configure-observers) one or more spatial observers
11
15
3.[Build and deploy](build-and-deploy) to a platform that supports spatial awareness
12
16
13
17
### Enable Spatial Awareness
14
18
15
-
The spatial awareness system is managed by the MixedRealityToolkit object (or another [service registrar](xref:Microsoft.MixedReality.Toolkit.IMixedRealityServiceRegistrar) component).
19
+
The spatial awareness system is managed by the MixedRealityToolkit object (or another
> The following steps presume use of the MixedRealityToolkit object. Steps required for other service registrars may be different.
16
23
17
-
```
18
-
Note:
19
-
The following steps presume use of the MixedRealityToolkit object. Steps required for other service registrars may be different.
20
-
```
21
24
1. Select the MixedRealityToolkit object in the scene hierarchy.
22
25
23
26

@@ -30,14 +33,14 @@ The following steps presume use of the MixedRealityToolkit object. Steps require
30
33
31
34

32
35
33
-
```
34
-
Note:
35
-
Users of the default profile (DefaultMixedRealityToolkitConfigurationProfile) will have the spatial awareness system pre-configured to use the MixedRealitySpatialAwarenessSystem from the Mixed Reality Toolkit Spatial Awareness Service package.
36
-
```
36
+
> Users of the default profile (DefaultMixedRealityToolkitConfigurationProfile) will have the spatial awareness system pre-configured to use the MixedRealitySpatialAwarenessSystem from the Mixed Reality
37
+
Toolkit Spatial Awareness Service package.
37
38
38
39
### Register observers
39
40
40
-
Before the spatial awareness system can provide applications with data about the real-world, at least one spatial observer must be registered. Spatial observers are generally platform specific components that may vary in the type(s) of data (ex: meshes) provided.
41
+
Before the spatial awareness system can provide applications with data about the real-world, at least
42
+
one spatial observer must be registered. Spatial observers are generally platform specific components
43
+
that may vary in the type(s) of data (ex: meshes) provided.
41
44
42
45
1. Open or expand the Spatial Awareness System profile
43
46
@@ -48,43 +51,39 @@ Before the spatial awareness system can provide applications with data about the
48
51
49
52

50
53
51
-
```
52
-
Note:
53
-
Users of the default profile (DefaultMixedRealitSpatialAwarenessSystemProfile) will have the spatial awareness system pre-configured to use the WindowsMixedRealitySpatialMeshObserver from the Mixed Reality Toolkit Windows Mixed Reality Provider package.
54
-
```
54
+
> Users of the default profile (DefaultMixedRealitSpatialAwarenessSystemProfile) will have the spatial awareness system pre-configured to use the WindowsMixedRealitySpatialMeshObserver from the Mixed Reality
55
+
Toolkit Windows Mixed Reality Provider package.
55
56
56
57
#### Configure observers
57
58
58
-
Once the spatial observer(s) have been registered with the system, they can be configured to provide the desired data.
59
+
Once the spatial observer(s) have been registered with the system, they can be configured to provide
60
+
the desired data.
59
61
60
-
```
61
-
Note:
62
-
When configuring a spatial observer, many implementations will auto-populate the observer's configuration profile with common default values.
63
-
```
62
+
> When configuring a spatial observer, many implementations will auto-populate the observer's configuration profile with common default values.
The illustration in the previous step shows the configuration profile for a spatial mesh observer. Please see [Spatial Mesh Observer profile](../TODO.md) for more information pertaining to the specific settings available to mesh observers. Other observers may have similar settings.
70
+
The illustration in the previous step shows the configuration profile for a spatial mesh observer.
71
+
Please see [Configuring the Spatial Awareness Mesh Observer](ConfiguringSpatialAwarenessMeshObserver.md) for more information pertaining to the specific
72
+
settings available to mesh observers. Other observers may have similar settings.
72
73
73
74
### Build and Deploy
74
75
75
-
Once the spatial awareness system is configured with the desired observer(s), the project can be built and deployed to the target platform.
76
+
Once the spatial awareness system is configured with the desired observer(s), the project can be built
77
+
and deployed to the target platform.
76
78
77
-
```
78
-
Note:
79
-
Some platforms, including Microsoft HoloLens, provide support for remote execution from within Unity. This feature enables rapid development and testing without requring the build and deploy step.
79
+
> Some platforms, including Microsoft HoloLens, provide support for remote execution from within Unity.
80
+
This feature enables rapid development and testing without requring the build and deploy step. Be sure to do final acceptance testing using an built and deployed version of the application, running
80
81
81
-
Be sure to do final acceptance testing using an built and deployed version of the application, running on suported hardware before releasing.
82
-
```
83
82
84
83
## See Also
85
84
86
85
-[Spatial Awareness API documentation](xref:Microsoft.MixedReality.Toolkit.SpatialAwareness)
87
-
-[Spatial Mesh Observer profile](../TODO.md)
88
-
-[Using Spatial Awareness in an application](../TODO.md)
86
+
-[Configuring the Spatial Awareness Mesh Observer](ConfiguringSpatialAwarenessMeshObserver.md)
87
+
-[Using Spatial Awareness in an Application](../TODO.md)
0 commit comments