SlideShare a Scribd company logo
1 of 14
Unity だけど MRTKv2 使わないで
HoloLens 2 開発したい
2020/3
発表する人
• ホロラボにいる
• Microsoft MVP持ってる
HoloLab Inc. Confidential 2
Mixed Reality Toolkit (MRTK) はいいぞ
• Unity での AR/VR/MR アプリケーション開発用ツールキット
• 開発の主導は Microsoft
https://github.com/microsoft/MixedRealityToolkit-Unity
HoloLab Inc. Confidential 3
MRTKv2を使わずにHoloLens 2開発
• MRTKv2を使うと不都合がある
• 既存ライブラリと競合してしまう
• 簡単なAirTapだけ追加できればいい
• ハンドトラッキングの詳細な動きを知りたい
• MRTKv2ではできないハンドトラッキングの動作を行わせたい
• Unity 2018を対象
HoloLab Inc. Confidential 4
MRTKv2を使わずにHoloLens 2開発
• プロジェクト設定
• PlatformをUWP
• XR SettingsのVirtual Reality Supportedにチェック
HoloLab Inc. Confidential 5
ハンド情報を使いたい
• 提供されているハンド情報
• Unityが提供している関数を利用
• Hand Gesture(AirTap, Hold, Manipulation, Navigation)
• Hand Pose
• Hand Pointer
• UWPが提供している関数を利用
• Hand Joint <- 今回はこちら
• Hand Mesh
https://github.com/microsoft/MixedRealityToolkit-
Unity/blob/mrtk_development/Documentation/Input/HandTracking.md
HoloLab Inc. Confidential 6
UnityでAirTapを使いたい
• InteractionManagerを利用(UnityEngine.XR.WSA.Input)
• 取得できる状態
• ハンドの検出(Detect, Lost)
• AirTapの状態(Press, Release)
• ハンドの位置
• ハンドの回転(HoloLens 2,WinMRのみ)
• 左右の判別(HoloLens 2,WinMRのみ)
• InteractionManagerの使い方
• https://akihiro-document.azurewebsites.net/post/hololens_input20172/
• Hand MeshやHand Jointはサポートされていない
• Unity 2019以降はWindows XR Pluginを利用
HoloLab Inc. Confidential 7
Hand Jointも欲しい
• 指先でつんつんしたい
• SpatialInteractionManagerを利用(Windows.UI.Input.Spatial)
HoloLab Inc. Confidential 8
// UnityのStart()内で設定
SpatialInteractionManager spatialInteraction = null;
UnityEngine.WSA.Application.InvokeOnUIThread(() =>
{
spatialInteraction = SpatialInteractionManager.GetForCurrentView();
}, true);
// Hand状態のUpdateイベント
spatialInteraction.SourceUpdated += (sender, args)=>
{
var handPose = args.State.TryGetHandPose();
if (handPose.TryGetJoints(spatialCoordinateSystem, handJoints, jointPoses))
{
UnityEngine.WSA.Application.InvokeOnAppThread(() =>
{
// ここでjointPosesのTransform情報をUnityに適応させる
}, false);
}
};
Hand Jointも欲しい
HoloLab Inc. Confidential 9
• ポイント
• UWP関数のためUnityEditor上では動作しない
• 実機で確認
• 関数の動作可能なThreadが決まっている
• InvokeOnUIThread, InvokeOnAppThreadで切り分け
• 人差し指の先と根元にSphereを追従した場合
利用例
HoloLab Inc. Confidential 10
手の向きによってUIの表示を切り替え
https://twitter.com/i/status/1230047509336035328
利用例
HoloLab Inc. Confidential 11
ハンドトラッキングの動作
https://twitter.com/i/status/1228308717386387456
Mixed Reality Toolkit (MRTK) 拡張
• 日本語ドキュメント公開
• https://hololabinc.github.io/MixedRealityToolkit-
Unity/Documentation.ja/GettingStartedWithTheMRTK.html
• 他デバイス拡張も公開
• MagicLeap
• https://github.com/HoloLabInc/MRTKExtensionForMagicLeap
• Nreal Light
• https://github.com/HoloLabInc/MRTKExtensionForNrealLight
• Oculus Quest
• https://github.com/HoloLabInc/MRTKExtensionForOculusQuest
HoloLab Inc. Confidential 12
Mixed Reality Toolkit (MRTK) はいいぞ
• Unity での AR/VR/MR アプリケーション開発用ツールキット
• 開発の主導は Microsoft
https://github.com/microsoft/MixedRealityToolkit-Unity
HoloLab Inc. Confidential 13
まとめ
• MRTKv2使わなくてもUnityでHoloLens 2のアプリは動く
• ただしプロジェクト設定は自分で設定
• Unity関数でAirTapと位置がわかる
• ただしUnity 2019から利用関数が変更される
• UWP関数でHoloLens 2特有のハンド情報が取得できる
• ただし実機でしか動作確認ができない
• MRTKv2は便利でいいぞ
HoloLab Inc. Confidential 14

More Related Content

Recently uploaded

論文紹介:Semantic segmentation using Vision Transformers: A survey
論文紹介:Semantic segmentation using Vision Transformers: A survey論文紹介:Semantic segmentation using Vision Transformers: A survey
論文紹介:Semantic segmentation using Vision Transformers: A surveyToru Tamaki
 
TataPixel: 畳の異方性を利用した切り替え可能なディスプレイの提案
TataPixel: 畳の異方性を利用した切り替え可能なディスプレイの提案TataPixel: 畳の異方性を利用した切り替え可能なディスプレイの提案
TataPixel: 畳の異方性を利用した切り替え可能なディスプレイの提案sugiuralab
 
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...Toru Tamaki
 
TSAL operation mechanism and circuit diagram.pdf
TSAL operation mechanism and circuit diagram.pdfTSAL operation mechanism and circuit diagram.pdf
TSAL operation mechanism and circuit diagram.pdftaisei2219
 
SOPを理解する 2024/04/19 の勉強会で発表されたものです
SOPを理解する       2024/04/19 の勉強会で発表されたものですSOPを理解する       2024/04/19 の勉強会で発表されたものです
SOPを理解する 2024/04/19 の勉強会で発表されたものですiPride Co., Ltd.
 
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介Yuma Ohgami
 
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)Hiroki Ichikura
 
論文紹介:Automated Classification of Model Errors on ImageNet
論文紹介:Automated Classification of Model Errors on ImageNet論文紹介:Automated Classification of Model Errors on ImageNet
論文紹介:Automated Classification of Model Errors on ImageNetToru Tamaki
 

Recently uploaded (8)

論文紹介:Semantic segmentation using Vision Transformers: A survey
論文紹介:Semantic segmentation using Vision Transformers: A survey論文紹介:Semantic segmentation using Vision Transformers: A survey
論文紹介:Semantic segmentation using Vision Transformers: A survey
 
TataPixel: 畳の異方性を利用した切り替え可能なディスプレイの提案
TataPixel: 畳の異方性を利用した切り替え可能なディスプレイの提案TataPixel: 畳の異方性を利用した切り替え可能なディスプレイの提案
TataPixel: 畳の異方性を利用した切り替え可能なディスプレイの提案
 
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
 
TSAL operation mechanism and circuit diagram.pdf
TSAL operation mechanism and circuit diagram.pdfTSAL operation mechanism and circuit diagram.pdf
TSAL operation mechanism and circuit diagram.pdf
 
SOPを理解する 2024/04/19 の勉強会で発表されたものです
SOPを理解する       2024/04/19 の勉強会で発表されたものですSOPを理解する       2024/04/19 の勉強会で発表されたものです
SOPを理解する 2024/04/19 の勉強会で発表されたものです
 
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
 
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
 
論文紹介:Automated Classification of Model Errors on ImageNet
論文紹介:Automated Classification of Model Errors on ImageNet論文紹介:Automated Classification of Model Errors on ImageNet
論文紹介:Automated Classification of Model Errors on ImageNet
 

Featured

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

UnityだけどMRTKv2使わないでHoloLens 2開発したい

  • 1. Unity だけど MRTKv2 使わないで HoloLens 2 開発したい 2020/3
  • 2. 発表する人 • ホロラボにいる • Microsoft MVP持ってる HoloLab Inc. Confidential 2
  • 3. Mixed Reality Toolkit (MRTK) はいいぞ • Unity での AR/VR/MR アプリケーション開発用ツールキット • 開発の主導は Microsoft https://github.com/microsoft/MixedRealityToolkit-Unity HoloLab Inc. Confidential 3
  • 4. MRTKv2を使わずにHoloLens 2開発 • MRTKv2を使うと不都合がある • 既存ライブラリと競合してしまう • 簡単なAirTapだけ追加できればいい • ハンドトラッキングの詳細な動きを知りたい • MRTKv2ではできないハンドトラッキングの動作を行わせたい • Unity 2018を対象 HoloLab Inc. Confidential 4
  • 5. MRTKv2を使わずにHoloLens 2開発 • プロジェクト設定 • PlatformをUWP • XR SettingsのVirtual Reality Supportedにチェック HoloLab Inc. Confidential 5
  • 6. ハンド情報を使いたい • 提供されているハンド情報 • Unityが提供している関数を利用 • Hand Gesture(AirTap, Hold, Manipulation, Navigation) • Hand Pose • Hand Pointer • UWPが提供している関数を利用 • Hand Joint <- 今回はこちら • Hand Mesh https://github.com/microsoft/MixedRealityToolkit- Unity/blob/mrtk_development/Documentation/Input/HandTracking.md HoloLab Inc. Confidential 6
  • 7. UnityでAirTapを使いたい • InteractionManagerを利用(UnityEngine.XR.WSA.Input) • 取得できる状態 • ハンドの検出(Detect, Lost) • AirTapの状態(Press, Release) • ハンドの位置 • ハンドの回転(HoloLens 2,WinMRのみ) • 左右の判別(HoloLens 2,WinMRのみ) • InteractionManagerの使い方 • https://akihiro-document.azurewebsites.net/post/hololens_input20172/ • Hand MeshやHand Jointはサポートされていない • Unity 2019以降はWindows XR Pluginを利用 HoloLab Inc. Confidential 7
  • 8. Hand Jointも欲しい • 指先でつんつんしたい • SpatialInteractionManagerを利用(Windows.UI.Input.Spatial) HoloLab Inc. Confidential 8 // UnityのStart()内で設定 SpatialInteractionManager spatialInteraction = null; UnityEngine.WSA.Application.InvokeOnUIThread(() => { spatialInteraction = SpatialInteractionManager.GetForCurrentView(); }, true); // Hand状態のUpdateイベント spatialInteraction.SourceUpdated += (sender, args)=> { var handPose = args.State.TryGetHandPose(); if (handPose.TryGetJoints(spatialCoordinateSystem, handJoints, jointPoses)) { UnityEngine.WSA.Application.InvokeOnAppThread(() => { // ここでjointPosesのTransform情報をUnityに適応させる }, false); } };
  • 9. Hand Jointも欲しい HoloLab Inc. Confidential 9 • ポイント • UWP関数のためUnityEditor上では動作しない • 実機で確認 • 関数の動作可能なThreadが決まっている • InvokeOnUIThread, InvokeOnAppThreadで切り分け • 人差し指の先と根元にSphereを追従した場合
  • 10. 利用例 HoloLab Inc. Confidential 10 手の向きによってUIの表示を切り替え https://twitter.com/i/status/1230047509336035328
  • 11. 利用例 HoloLab Inc. Confidential 11 ハンドトラッキングの動作 https://twitter.com/i/status/1228308717386387456
  • 12. Mixed Reality Toolkit (MRTK) 拡張 • 日本語ドキュメント公開 • https://hololabinc.github.io/MixedRealityToolkit- Unity/Documentation.ja/GettingStartedWithTheMRTK.html • 他デバイス拡張も公開 • MagicLeap • https://github.com/HoloLabInc/MRTKExtensionForMagicLeap • Nreal Light • https://github.com/HoloLabInc/MRTKExtensionForNrealLight • Oculus Quest • https://github.com/HoloLabInc/MRTKExtensionForOculusQuest HoloLab Inc. Confidential 12
  • 13. Mixed Reality Toolkit (MRTK) はいいぞ • Unity での AR/VR/MR アプリケーション開発用ツールキット • 開発の主導は Microsoft https://github.com/microsoft/MixedRealityToolkit-Unity HoloLab Inc. Confidential 13
  • 14. まとめ • MRTKv2使わなくてもUnityでHoloLens 2のアプリは動く • ただしプロジェクト設定は自分で設定 • Unity関数でAirTapと位置がわかる • ただしUnity 2019から利用関数が変更される • UWP関数でHoloLens 2特有のハンド情報が取得できる • ただし実機でしか動作確認ができない • MRTKv2は便利でいいぞ HoloLab Inc. Confidential 14