Coder Social home page Coder Social logo

jbienzms / spatialalignment Goto Github PK

View Code? Open in Web Editor NEW
34.0 1.0 5.0 104.83 MB

Helpful components for aligning and keeping virtual objects aligned with the physical world.

License: MIT License

C# 98.72% Batchfile 1.13% Objective-C++ 0.11% Ruby 0.04%
alignment alignment-strategies refinement drift architecture hololens augmented-reality mixed-reality

spatialalignment's People

Contributors

jbienzms avatar rogerschoellgen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

spatialalignment's Issues

Parent SortOrder determined by ParentOption

Currently ParentOption has a method for calculating its own sort-order. This really should be handled by the alignment strategy rather than the option so that each strategy can have different sorting criteria.

Fine Spatial Mapping Mesh

Spatial Mapping includes a Fine mode for more refined poly's in the mesh. That would help when using tools like RayRefinement. This should probably be the default for these examples.

Integration problem.

Hi, I have a lot of errors in the solution. For example, I don't have holotoolkit, which I guess is Microsoft's mixed reality now. How can I integrate this package now?

Large Scale Refinement Controller Needed

Currently RefinableModel uses TwoHandManipulatable and BoundingBoxRig as methods of aligning the large-scale hologram. However, neither of these behaviors work correctly from inside the 3D model looking outward (as is necessary for a building-sized hologram). We need some sort of proxy object that can handle manipulation of the large-scale object while inside of it.

Support for non-MRTK projects

SpatialAlignment would be helpful for other platforms including iOS and Android, but currently components of the library require MRTK. (Specifically RefinableModel uses TwoHand and BoundingBoxRig). The library should be reorganized in some way that allows the MRTK-dependent components to be deselected during library import.

Improved Persistence Examples

The SA-Persistence sample currently only serializes the spatial graph into a json string or deserializes a json string into a spatial graph. This could be improved to show saving to a file.

In addition, the SA-RefinementBuilding sample does not use persistence. Therefore the alignment is lost between runs of the application.

Recommend creating a new sample based on SA-RefinementBuilding that also implements persistence. A voice command could saves the spatial graph to a text file in the applications isolated storage folder. The next time the application runs the app could check to see if that file exists and load the spatial graph from that file instead of starting new.

Multi-Parent is really Favored Parent

Though MultiParent maintains a list of potential parents, the current implementation still ends up selecting one. This really should be called FavoredParent. A true MultiParent would take into account multiple parents simultaneously for positioning. This would allow weighted balance positioning.

RefinementExampleManager

Hi,
When I try to run your refinement example scene with the same version of Unity, I get this error below in the console. I have been trying to look for the cause for several days but I do not understand what is wrong as I just use your example without modifying any serialized field or something like this.
If you have any idea about what can be the problem, it would be really helpful, thank you !

Capture

Add Vector-Based Alignment Option

Vector-based alignment seems pretty easy to implement and would be quite helpful in aligning large-scale building holograms to the physical world.

Vector-based alignment works by specifying an origin and a direction. The origin and direction are specified on the model, then corresponding origin and direction are specified in the real world. The origins are aligned (via a simple Vector3 offset calculation) and the two directions are used to calculate a simple rotation around the origin.

This should be far easier to implement than a true segment-based alignment, since the length of the segment (scale) and differences in y values (pitch and roll) are completely ignored.

Support for weighted values across multiple parents

The current implementation of multi-parent actually selects a single "favored" parent. This is being addressed in #4, but in the new approach we should provide an option for using "weighted values" across parents.

What

The scene contains two parents, A and B. A and B both have different positions, offsets and rotations.

  • If the user is standing at A, the child will use A's position, offset and rotation.
  • If the user is standing at B, the child will use B's position, offset and rotation.
  • If the user is half way between A and B, the child will use 50% of A's values and 50% of B's values.
  • If the user has walked 25% of the distance from A to B, the child will use 75% of A's values and 25% of B's values.

And so on.

If there are 3 parents A, B and C, the weighted values will take into account all 3 parents.

Why

Spatial anchor systems tend to be valuable and sometimes finite resources. With ARCore and ARKit, for example, each anchor incurs a performance penalty. On HoloLens there is a higher limit, but there is still recommended limit to the overall count of spatial anchors. And of course QR Codes require physical printing and placement in the environment.

A "Weighted Values" system will provide improved alignment between anchors. It will also reduces (or even eliminate) the "popping" that occurs when switching between anchors. Together, such a system will dramatically reduce the total number of anchors needed for the same given area.

How

It is recommended that we implement this solution using Inverse Distance Weighted Interpolation. IDW allows the weight to be calculated as a percentage of the distance between all parents. IDW also has a configurable Power Factor which can be used to influence the weights toward or away from the nearest parent.

Need phone compatible placement options

We need a way to place anchors and do Ray-Based alignment on phones. The current approach uses an new version of TapToPlace which depends on MRTK solvers. These solvers would theoretically work in the future if MRTK supported ARFoundation, but they do not work right now. A solution is needed that will likely depend on screen taps and ARCore plane intersections.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.