Skip to content

Commit 19e3a2b

Browse files
authored
Merge pull request #10 from jbienzms/feature/ReleaseDocs
Feature/release docs
2 parents 7e0a68a + 6869390 commit 19e3a2b

File tree

8 files changed

+49
-10
lines changed

8 files changed

+49
-10
lines changed
-52.9 KB
Loading
297 KB
Loading
-54.2 KB
Loading
-66.7 KB
Loading
-43.8 KB
Loading
3.83 MB
Loading
-67.2 KB
Loading

README.md

Lines changed: 49 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,81 @@
11
# Spatial Alignment for Unity
2+
23
This reference architecture includes many helpful components for aligning and keeping virtual objects aligned with the physical world.
34

5+
46
### Release 1.0
7+
58
Release 1.0 contains the following capabilities:
69

7-
##### Spatial Frames
8-
*Spatial Frames* represent "islands" in the real world. They have a position and a rotation and are designed to hold objects. They also have unique IDs and can be available from the moment the application loads (even before they're found in the real world). This simplifies application logic because objects can be loaded up front and automatically aligned when the frame is found.
10+
11+
#### Spatial Frames
12+
13+
*Spatial Frames* represent "islands" in the real world. They have a position and a rotation and are designed to hold objects. They also have unique IDs and are available from the moment the application loads (even before they're found in the real world). This simplifies application logic because objects can be loaded up front and automatically aligned when the frame is found.
914

1015
![](External/ReadMeImages/Align-FramesAndStrategies.png)
1116

17+
1218
##### Alignment Strategies
13-
Each *Spatial Frame* has an *Alignment Strategy*. The strategy is what moves the frame and keeps it aligned in the physical world. Alignment Strategies are "plugins", and developers can easily create their own strategies. Applications are free to mix and match various strategies in the same application.
19+
20+
Each *Spatial Frame* has an *Alignment Strategy*. The strategy is what moves the frame and keeps it aligned in the physical world. Alignment Strategies are "plugins", and developers can easily create their own strategies. Developers are also free to mix and match various strategies in the same application.
1421

1522
![](External/ReadMeImages/Align-MixStrategies.png)
1623

17-
Alignment Strategies provide information about their state (e.g. whether they've been found) and their accuracy (maximum drift in meters). Applications can then use this information to make intelligent decisions about the best frames to use contain objects. In fact, one of the included strategies is a *Multi-Parent* strategy that allows objects to automatically "hop" parent frames based on their state and accuracy.
24+
Alignment Strategies provide information about their state (e.g. whether they've been found) and their accuracy (maximum drift in meters). Applications can use this information to make intelligent decisions about which frames are best to contain which objects. In fact, one of the included alignment strategies is a *Multi-Parent* strategy that allows objects to automatically "hop" parent frames based on their state and accuracy.
1825

1926
![](External/ReadMeImages/Align-ParentHopping.png)
2027

21-
##### Refinement
22-
Two of the greatest challenges with spatial alignment are:
28+
29+
#### Refinement
30+
31+
Two of the biggest challenges that accompany spatial alignment are:
2332

2433
1. Initial placement (and rotation) of objects to match up with the physical world
2534
2. Accounting for drift that accumulates over distance (a challenge that is present in all large-scale tracking systems)
2635

27-
This reference architecture includes components to help address both. To help with accurate alignment, an extensible system of *Refinement Controllers* is provided. In version 1.0 there is one refinement controller included called **RayRefinement**. **RayRefinement** allows a virtual model and a physical space to be aligned by selecting the corresponding origin points and a direction.
36+
This reference architecture includes components to help address both. To help with accurate alignment, an extensible system of *Refinement Controllers* is provided. Version 1.0 includes one refinement controller called **RayRefinement**. **RayRefinement** aligns a virtual model to a physical place by selecting corresponding origin points and directions.
37+
38+
![](External/ReadMeImages/Align-RayRefine.gif)
39+
40+
To help compensate for drift, *Multi-Parent* alignment offers the ability to apply different positional and rotational offsets at each parent.
41+
42+
![](External/ReadMeImages/Align-Refine.png)
43+
44+
The offset ability can be used together with a *Refinement Controller* to bring large-scale models back into alignment when viewed from different locations.
45+
46+
The video below demonstrates using **RayRefinement** to align a [Matterport 3D](https://matterport.com/) scan of a building with the actual building and keep that scan in alignment from different locations.
47+
48+
[![](External/ReadMeImages/Align-MPScanVideo.jpg)](https://youtu.be/IINWbBeIRL0)
49+
50+
51+
#### Persistence
52+
53+
Applications that leverage spatial alignment generate a notable amount of configuration data:
2854

55+
- All of the Frames and their IDs
56+
- All of the configuration settings for each Alignment Strategy
57+
- Relationships between Frames (e.g. Multi-Parent alignment)
58+
- Position, Rotation and Scale offsets
59+
- State requirements (e.g. Resolved, Tracking)
60+
- Accuracy requirements
61+
- etc.
2962

30-
**TODO: RayRefinement Video**
63+
To help applications save all of this data, every component in the architecture is serializable. In fact, the included class **JsonStore** can be used to serialize an entire alignment "graph" into json, which can then be loaded back the next time the application runs.
3164

65+
![](External/ReadMeImages/Align-Persistence.png)
3266

3367

68+
#### Examples
3469

35-
##### Persistence
70+
Release 1.0 includes the following example scenes:
3671

72+
- **SA-MultiParent** - Demonstrates "hopping" between multiple parent spheres in the scene.
73+
- **SA-Persistence** - Demonstrates saving an entire "graph" of frames and their strategies into memory then loading them back into the scene.
74+
- **SA-Refinement** - Demonstrates using **RayRefinement** to place a multi-colored cube in a room.
75+
- **SA-RefinementBuilding** - Demonstrates using **RayRefinement** to align a Matterport 3D scan to room. (This example is shown in the video above).
3776

38-
##### Examples
3977

78+
### Contributing
4079

4180
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
4281
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [[email protected]](mailto:[email protected]) with any additional questions or comments.

0 commit comments

Comments
 (0)