microsoft / MixedRealityToolkit-Unity

This repository is for the legacy Mixed Reality Toolkit (MRTK) v2. For the latest version of the MRTK please visit https://github.com/MixedRealityToolkit/MixedRealityToolkit-Unity
https://aka.ms/mrtkdocs
MIT License
6k stars 2.12k forks source link

Make SpatialUnderstanding's ScanSearchDistance configurable #655

Closed assert-not-singularity closed 6 years ago

assert-not-singularity commented 7 years ago

Is there a reason to make the setting mentioned above constant?

Otherwise this makes the whole usage more unflexible. This parameter specifies how much of area has to be scanned and walked along until the scanning process is completed and the understanding module determines the surfaces, right? Because I'd like specify for myself how big my "play area" should be.

So just removing the const would enable me to do this on my own.

jessemcculloch commented 7 years ago

The ScanSearchDistance is what determines how far away from the HoloLens it pays attention to when doing the scanning. When you stand in the center of a room, with the Constant set at 8.0f like it is now, it will scan in an 8 meter sphere around you. To map things further away than that, you will have to move forward until the items you want scanned are within that range.

If you ware wanting to set parameters for minimum amount scanned, minimum vertical/horizontal surfaces, etc, you can do that by querying the playspace. For some insight as to how this is done, check out this tutorial - http://www.cameronvetter.com/2017/01/03/hololens-tutorial-finalize-spatial-understanding/

assert-not-singularity commented 7 years ago

Okay, if I understand that correctly, that means that I don't have to scan the whole 8x8 m to achieve a scan quality high enough to finalize my playspace? I just query the area that I need?

lucaheft commented 7 years ago

Did anyone ever scan a room with SpatialUnderstanding bigger than 8x8 m? Because it doesnt seem to make a difference when setting the ScanSearchDistance to 20 as well as the SpatialMapping.

For me the room SpatialUnderstanding scans is still 8x8 m