Hello everyone.

The Mixed Reality Forums here are no longer being used or maintained.

There are a few other places we would like to direct you to for support, both from Microsoft and from the community.

The first way we want to connect with you is our mixed reality developer program, which you can sign up for at https://aka.ms/IWantMR.

For technical questions, please use Stack Overflow, and tag your questions using either hololens or windows-mixed-reality.

If you want to join in discussions, please do so in the HoloDevelopers Slack, which you can join by going to https://aka.ms/holodevelopers, or in our Microsoft Tech Communities forums at https://techcommunity.microsoft.com/t5/mixed-reality/ct-p/MicrosoftMixedReality.

And always feel free to hit us up on Twitter @MxdRealityDev.

HoloToolkit Spatial Understanding Room Size stuck at maximum 10x10 metres

Hi, i am doing a project for my Master's Thesis in which i need a bigger playarea than 10x10 metres, i have changed the variable ScanSearchDistance in SpatialUnderstanding.cs to 40f but it seems to have a lock in the DLL to be 10f.

However i tried to bypass this by scanning batches of 10x10 metres and adding them together, it works in the Unity editor but when running it in the HoloLens it seems to ignore parts of the environment that are a specific distance away from the "start position". Lets say after about a distance of 15 metres from the start position, the scan ignores the environment but can keep on scanning parts of the environment that is closer than 15 metres.

I have been stuck with this for a while and would really appreciate some help from the HoloToolkit dev team or anyone else that have good knowledge or ideas of how to fix this.
Thank you.

Best Answer

  • Answer ✓

    Look at the SpatialMappingObserver.cs script. That is where the 10.0f extent is being set.

Answers

  • @Laxad I am also experiencing the same issue. Changing the value of the ScanSearchDistance variable does not seem to have an effect on the actual scan distance although what I've noticed is that if I ramp up the variable to 50.0f, my app crashes when I try to deploy it. I also tried other values: 40.0f works but is very slow (a few triangles per 10-20 seconds), 20.0f seems fine. Even though I change it to 20, there is always a set distance from where I deploy the app that the spatial understanding mesh will cut off and stop scanning beyond that "line".

    Another thing to consider is as the playspace gets larger are you having trouble stabilizing the mesh? I'm finding that my app crashes more often and the mesh actually shifts (without readjusting back to its actual position) a couple of cm as I walk around the room.

  • No i have not noticed any stabilizing problem, if you manage to solve this issue please write and tell me :)

  • Answer ✓

    Look at the SpatialMappingObserver.cs script. That is where the 10.0f extent is being set.

  • @Jesse_McCulloch I tried changing the multiplicative factor 10.0f value in the Extents variable in SpatialMappingObserver to 500 and to 0 but nothing really changed, it still had the same cutoff distance as before. I even tried changing it in the test scene for SpatialUnderstanding, same effect.

    @Laxad It seems like for me, or perhaps the HoloLens, always crashes whenever I walk to fast around the room when scanning. And the mesh always shifts even if I am standing still. I tried this both with the test scene and my app and it is persistent, I am wondering if it is my HoloLens that is the issue.

  • @Jesse_McCulloch I tested it and get the same results as @ccyuen, of the things i have tested thus far the extent isnt doing anything at all for me.

  • In doing some testing, I have found the same thing. Interestingly, I find that the native mapping that happens in the shell (when no applications are running) seems to have this same limitation. I am guessing that when the anniversary update rolled out to the HoloLens, this limitation was put in place at a higher level than we have api access to control...

  • @Jesse_McCulloch The shell spatial mapping seems to be fine for me, I am able to scan much greater than 10 metres. Although I do want to note that as the spatial mesh area gets larger, the more difficult, I find, that the HoloLens has with the accuracy and stability of the mesh. Especially since the files for the mesh data are a couple hundred mb, for me at least. It is just for applications that I am having this issue with the limitation of the spatial mapping, perhaps present in the DLL for spatial mapping? (I am using spatial understanding in my app, although this shouldn't be an issue since it depends on spatial mapping)

  • @ccyuen @Jesse_McCulloch I fixed my problem (not to change the 10x10 playspace), when i changed the extent and made some more testing i found out that the problem i mentioned in my original post is fixed when running in the HoloLens. I said the scan ignores to scan further than 15x15 metres, when extent is increased that area is also increased.

    So what i do is taking scans of 10x10 metres, finalizing the scan, making a new scan, and adding them together, and so forth. When increasing the extent it works fine. However for each scan the "knowledge" about the environment resets so i save the data i need between the scans.

  • @Jesse_McCulloch said:
    In doing some testing, I have found the same thing. Interestingly, I find that the native mapping that happens in the shell (when no applications are running) seems to have this same limitation. I am guessing that when the anniversary update rolled out to the HoloLens, this limitation was put in place at a higher level than we have api access to control...

    Frankly - I do not understand your response. The problem with the play space size seems to be related to Spatial Understanding which in my understanding has no direct dependency to changes in the anniversary update - as spatial mapping itself works definitely with larger spaces. So it seems to be a "problem" in the C++ DLL perhaps?

  • @DaTruAndi - I was just trying to point out that when in the shell, when I airtap and kick off the shell spatial mapping, it seems to only be doing a limited space, just like we are seeing in the spatial mapping DLL.

  • Hi,
    @Laxad I am really interested in your method to get a larger room spatially understood. How do you save the informations to add and use them at a later point please ?

  • @Laxad @DamienS I am also stuck on the same problem. Has anyone solved this issue?

  • @amngupta said:
    @Laxad @DamienS I am also stuck on the same problem. Has anyone solved this issue?

    Unfortunately not.
    As @Jesse_McCulloch submitted I have tried modifying the public attribute seemingly meant to do that, with no effect at all.

  • edited February 2018

    The attribute you should be able to update is in SpatialUnderstanding.cs:

    public const float ScanSearchDistance = 8.0f;

    I just encountered this issue when trying to process some saved spatial meshes of my own, and noticing that my spatial understanding mesh was cutting off part of it. I was able to bump up the number to 20.0f and that worked well for my needs. I don't know if the underlying code has changed to make this work (maybe it was hardcoded in the DLL and now it's not?).

  • @DanAndersen said:
    The attribute you should be able to update is in SpatialUnderstanding.cs:

    public const float ScanSearchDistance = 8.0f;

    I just encountered this issue when trying to process some saved spatial meshes of my own, and noticing that my spatial understanding mesh was cutting off part of it. I was able to bump up the number to 20.0f and that worked well for my needs. I don't know if the underlying code has changed to make this work (maybe it was hardcoded in the DLL and now it's not?).

    Update: I was mistaken. I attempted to use the Spatial Mapping on a larger room (20m x 15m) and was unable to use this method to make the Spatial Understanding range larger.

Sign In or Register to comment.