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
6.01k stars 2.12k forks source link

Spatial Understanding Issue with Videos/Animations #595

Closed MatzeBehm closed 7 years ago

MatzeBehm commented 7 years ago

Hello,

we experienced big issues/difficulties as soon as we include the spatialunderstanding in our Project (spatialmapping alone works just fine). To clarify the Situation i explain briefly what we are trying to do:

We have sceneloader-scene which loads different scenes. Our spatialmapping/understanding is attached to a managerobject in the sceneloader scene ... we scan our room (during the sceneloader scene) finalize the scan via RequestFinishScan() ... the scan finishs we attach the occlusion material, everything is just fine. Then we load another scene, in this scene there are mecanim animations ... if we calculate the rotations of these animations via "euler" solver (rightclick the rotation parameter in the animation tab) the whole object flickers even after completing the animation. Ok we found a solution to this behaviour in changing the solver to "quaternion euler" ... remember this all works fine WITHOUT the spatialunderstanding module included. Also the behaviour is visible in the editor + hololens. We can also not get rid of this behaviour if we just delete the spatialunderstanding prefab ... the problem still exists. Only a restart of unity itself resets the state. There might be some weired stuff going on in the background with the .dll functions ... also we didn't even use any of our own functions for the spatialunderstanding yet. This happens with the BASIC module. So lets move away from the animation problem which we eventually "fixed" (more like avoided the problem). The next big issue is using spatial understanding with movie textures ... same procedure with sceneloader etc. ... this time we include movie textures in scene 1. The quality of the textures were set to 0.5 they are like 100 mb in total ... this time around in the editor all works fine and without any issues. As soon as we deploy it to our hololens and load scene 1 the app crashes ... ok maybe a performance issue we thought ---> lower quality to 0.3. Look at that the movie plays but we got NO Sound .... ---> we remove spatialunderstanding ---> everything works fine!

I hope I could clarify our Situation ... its very frustrating because we invested much time into spatialunderstanding functions and just wanted to use them -.-. Also even in case I repeat myself this all happens only with the spatialunderstanding module ... spatialmapping works fine!

ForrestTrepte commented 7 years ago

In issue #520, I noticed that Spatial Understanding was changing the floating point rounding mode and that was causing strange problems when I later tried to capture photos. In #656, I changed Spatial Understanding to restore the rounding mode after it is called. It is possible that your issues with animation and movies could be caused by the same underlying issue, so you may want to check if this is still a problem in recent versions of HoloToolkit that have the 5fc993ca8bc232dfddc7a34e22a5d8714189487b commit.

StephenHodgson commented 7 years ago

Going to close this. It's probably been archived by google by now.