How to get hand mesh data from Hololens2 without turning on Hand Mesh Visualization option

守給你的承諾、 提交于 2021-02-08 09:06:42

问题


I have tried to get hand mesh data from Hololens2 using MRTK V2 and Unity C#. Now, I can get hand mesh data with turning on Hand Mesh Visualization option and referring MRTK HandTracking guide.

Unfortunately, the visualization(drawing hand CG) is heavy workload. So, I would like to get hand mesh without turning on Hand Mesh Visualization option but OnHandMeshUpdated function is not called due to turning off Hand Mesh Visualization option.

Does anyone know how to get hand mesh data from Hololens2 without turning on Hand Mesh Visualization option?

Hand Mesh Visualization option


回答1:


MRTK does not directly provide this feature. According to the source code of MRTK-Unity, check out the code line 163 of BaseHandVisualizer class, you will find the majority of jobs are processed in the OnHandMeshUpdated event handler. When the current hand mesh is updated based on the passed-in state of the hand, OnHandMeshUpdated method will be invoked with HandMeshInfo event data. Once Hand Mesh Prefab field in [InputSystem]->[Hand Tracking] is set as "None", MRTK will not instantiate handMeshFilter according to the conditional statement. But the hand mesh related data will be easily accessible from the event data. Check out the class definition of HandMeshInfo here.



来源:https://stackoverflow.com/questions/62443151/how-to-get-hand-mesh-data-from-hololens2-without-turning-on-hand-mesh-visualizat

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!