UI for Hololnes 2 disappears randomly after a certain distance
Issue
After the user moves approximately 150m (500 ft), from the starting point of the app, the UI starts to flash randomly.
In the video below you can see 2 panels: the left one is made with the UnityUI and the right one with the MRTK UI system. https://drive.google.com/file/d/1mMUkfsreCf2FOtuTmXIqb6O1Ffr-42AE/view?usp=sharing
The right panel can be seen flashing randomly as soon as we move the head.
This happens also with the UnityUI, even if it's not highlighted in the video, The more we move away from the starting point the worst it gets (the UI stops flashing and disappears).
Notes on the MRTK settings
- boundaries are disabled
- Target Scale: World
- spatial awareness extent is 1000x1000
- UI elements have a radial view attached
We also tried the following:
- disabling radial view
- changing materials
- sorting layers
Steps to reproduce
- Create a blank project with Unity 2019.4.9f1 or 2019.4.8f1
- Import MRTK v2.2 or 2.3 or 2.4
- Create a new scene and add the "TestCanvas" from "....\Assets\MRTK\Examples\Demos\HandTracking\Prefabs"
- Add a "Radial View" component to the TestCanvas
- Set the Target Scale to World, disable boundaries, increase "observation extents" to 1000
- Run the app and walk approximately 150/200 meters (500/600 ft)
- Stand still and look around to see the error!
It can be also reproduced with other UI prefabs from the MRTK.
Setup
- Unity Version [e.g. 2019.4.9f1]
- MRTK Version [e.g. v2.2, 2.3, 2.4]
- Hololens 2
Every suggestion on how to work around this blocking issue is welcome! Thanks
This sounds like a Unity bug we've been working on for a bit now, where the culling frustum breaks down as you move further away from the app origin.
We believe we have a fix and are working on validation. I'll update here when the fix ships.
Thanks for the quick reply, that makes sense.
Do you have any strategy on how we can reduce this effect? We are in the phase of shipping a product, but it will not possible if the user can't move more than 100m.
Thanks
@Mitch753 Unfortunately, the issue is deep in Unity engine code, so I'm not aware of any way to improve it at the app layer. I'll let you know if we figure out any workarounds though!
@keveleigh @Mitch753 Hey guys,I got the same problem. I want to share some failing exp to you, maybe help: ) I have tried several ways to fix it,But they are all fail. I tried to change the near clip plane to a very small value, like 0.05...It doesn't work I specified 24-bit depth buffer,and it doesn't work too. I found the problem is related to calculating the distance between renderer and camera. I add a ConstantViewSize component on the view. the view is a hand-located view, always towards camera. And the view's size is changing regularly followed my spinning, just like the renderer's disappearing. Really hope some one could find a way to resolve it .I think it's a very serious problem.
Additionally ,the issue occurs in 10+m movement in my apps. : )
@keveleigh we're experiencing a similar issue. Do you have a reference to a Unity bug that we could track?
We also have this issue: after approximately 10m all UI elements will start to disappear at a certain head rotation. When you look back the UI reappears, turn your head and the UI disappears again. The further you move the larger these 'disappearing angles' become. This effects not only radial solvers but also our own followers and even the MRTK Articulated Hand Mesh
edit: added example gif
I just wanted to mention that by using the XR SDK with v2.53 the problem is fixed
@Mitch753 We're also running into this issue. Which XR SDK are you referring to with your fix? Does it require moving to the Unity XR Plugin system instead of the legacy XR?
@Mitch753 We're also running into this issue. Which XR SDK are you referring to with your fix? Does it require moving to the Unity XR Plugin system instead of the legacy XR?
Yes, that's correct.
I'm going to close this issue out. Unity did some work to improve this scenario on legacy, but it should be fully fixed on the latest Windows XR Plugin and OpenXR releases. Since legacy XR is now deprecated in the current Unity LTS, I don't expect any additional work to be done there. Please let me know if you run into any issues!