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.

Turning off spatial understanding completely?

Hello everybody!

Is there a possibility to turn off the spatial understanding of the device - by freezing coordinate systems and only use tag-along like rendering? I don't care if I need to use DirecX11 and C++ to achieve this effect as we do not need to use unity for our application, however if it is achievable in unity of course that is good for us too and might interest others.

The rational behind this is that there are cases when we would be able to develop applications that do not need the spatial information (or maybe would be working in a limited mode only based on IMU-data for turning) while using the spatial understanding when the environment does not change rapidly.

This is the case in moving trains, planes, cars, buses, subways, open-window elavators (!) and whatever bigger entities that have a moving space in them. We will try experimenting with the limited-mode that the device ask us when there is no wifi (or is turned off) as it might be what we need, however we are fascinated if there is a more formally accepted way of setting the thing into a mode where you don't use the spatial data and the device does not keep notifying you about the loss of mapping...

Any ideas on this topic?
Richard - R&D IT expert, Grepton Zrt.

Best Answer

Answers

  • @prenex @DavidKlineMS Your information is very useful for my project as I try to program the hologram to move with the car. But I cannot implement the code in the web page you posted. Have you successfully turned off the spatial understanding? Thanks a lot and looking forward to your help!

  • I have sent you a private message with the same contents as I have first seen there that you are asking me, but why not tell everyone these - I was thinking. ;-)

    So this is how I understand it so far (copy of your message):
    "
    Good morning Kai!

    Sorry, I was on Holidays with my loved one so I can answer only now.
    I was not handling tracking loss in Unity, but the examples are quite straightforward:
    You should see that the tracking loss is a global event or state. You can query the state in every frame from any of your scripts or you can try to handle the events.

    As it is written on the page you are linking, the automatic behaviour is that the unity engine shows you a spash-screen like (in my opinion ugly) thing which you can change. Also when there is a tracking loss, no updates and other draw will happen in the engine - which is great as there are more resources to regain tracking once again.

    If you are disabling this automatics, they say that nothing will happen, but you just won't get the updates to the "camera" position when there is no tracking. So until you code something, it would seem that all holograms will just start to come and stick along with the user until tracking happens. This is working like this because (as it seems) the unity engine just uses a very usual camera which has a translated position according to the tracking state normally so that is why the holographic christmas tree is coming closer to your eyes when you walk towards it - just keep in mind that in unity they have virtual worlds and only render properly because of this tracking info and if that is lost and this update is not happening, then it will seem that all objects move along with you...

    So what can you do with tracking loss handling? You are just able to ask these questions in your scripts:

    Tracking is online right now? (polling)
    When tracking goes away? (event notification)
    When tracking comes back? (event notification)
    

    What you asked me is where should you copy the example scripts... The answer is "depends". Because it depends on what you want to do with tracking loss handling.

    For example, you might be interested in creating an FPS game for ghustbusters in a big office with traps and stuff. Maybe you have a crosshair and semi-transparent ghosts to shoot at. What I would do in this situation? I would handle tracking loss by myself as it "makes sense": The crosshair, health bar and all the stuff that is part of the HUD user interface can stay even when there is no tracking (because they do not need the tracking info to just stay in front of camera anyways) while maybe I can alpha-blend out the ghosts. This way the user is not even able to see that a technical issue has have arisen ;-)

    It depends on the situation, but I hope this shows how it works and what to think about it...

    I see you are doing this in a car as I was also thinking about. Some more points on that topic....

    We have found that the so called "limited mode" gives more resource availabilty. What I mean by this is that in limited mode the system does not know and not try to track the "room" around it and for example can return more detailed spatial maps faster. When you are using the hololens only as a hud, this mode is just faster, but that way you will not be able to save anchors (even though you can still place things around you). This might work well in a car I think.
    
    Thinking back about why they mentioned handling tracking loss and manual handling of it is that this way we can use anchors in your char, even save them and stuff, but always show parts of the heads-up-display GUI (like speed-o-meter or whatever) in your car. This way you can put holograms around your car and if you just disable the automatic handling of tracking loss, you achieve that you can safely show a hud, and the spatial stuff might be disturbed a bit on tracking loss, but still shown.
    

    So maybe you only need to disable the logo-like thing of tracking loss in unity and rebuild your project, or maybe you want to handle hud vs. normal things differently or whatever you want.

    If the case is that you try to disable the automatic handling of tracking loss in the unity editor, rebuild and your thing on hololens still shows the loss of tracking afterwards, then it is most certainly a unity fault in its Hololens API/integration and you should notify people here or on unity forums / bug ticket pages. Also you can sometimes try to delete the whole VS solution and rebuild like that - or better: rebuild into a very new directory. Sometimes it helps in my opinion.

    I hope I have helped you. We work with Hololens in my team and know things hopefully deep-enough so if things are becoming really hot you can search us for direct help with development efforts too as our time is also money, but I thought why not send something detailed as happy new year and christmas. I hope I have helped or at least gave usable directions ;-)

    Richárd István Thier
    R&D creative workshop leader; IT expert
    Grepton Zrt.
    www.grepton.hu
    "

Sign In or Register to comment.