Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
XR Interaction Toolkit 1.0.0-pre で VR開発してみよう / ...
Search
Denik
February 19, 2021
Programming
5.2k
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
XR Interaction Toolkit 1.0.0-pre で VR開発してみよう / xrdnk-caunityLT1-presentation
Denik
February 19, 2021
More Decks by Denik
See All by Denik
Oculus Interaction SDK 概説 / xrdnk-caunity-LT4
xrdnk
0
12k
Unity Localization で多言語対応実装しよう / xrdnk-yokohamaunity-lt10-20220513
xrdnk
0
9.9k
XR Interaction Toolkit 2.0.0 正式リリース記念パピコ / xrdnk-xrmtg-lt-20220316
xrdnk
0
10k
Unidux を用いたマルチシーン構成の画面遷移 / xrdnk-unity-otonanolt-2021
xrdnk
0
5.9k
Unity Cloud Save でプレイヤーデータのクラウド保存しよう / xrdnk-yokohamaunitylt9
xrdnk
0
1.7k
Feel でゲームのエフェクトを豪華にしよう / xrdnk-yokohamaunityLT8
xrdnk
1
2k
Unidux Scene Transition Hands-on / xrdnk-unidux-scene-transition-hands-on
xrdnk
1
490
新MLAPIでマルチゲームを作ってみた / xrdnk-gotandaunityLT19-presentation
xrdnk
1
4.3k
三種の神器とMVRPパターン / xrdnk-three-sacred-treasures-and-mvrp-pattern
xrdnk
1
7.5k
Other Decks in Programming
See All in Programming
任せる範囲はこう広がった / How the Scope of AI Delegation Has Expanded
nrslib
1
260
吝嗇家のためのAI活用 / AI development for miser - ChatGPT + Issue Driven Development
tooppoo
0
190
SLOをサービス品質の共通言語にするために 取り組んできたこと
wakana0222
0
500
壊れたパーサから始める関数型設計と構成的なパーサ #fp_matsuri
raiga0310
2
230
なぜ関数型プログラミングで「型」と「証明」が語られるのか #fp_matsuri
kajitack
3
950
Even G2とAWSで推しのエージェントを召喚しよう!
har1101
1
170
20260623_Loop Engineeringで自分の分身の問い合わせBotを作る
ryugen04
0
220
symfony/aiとlaravel/boost
77web
0
130
【やさしく解説 設計編・中級 #4】ルールの寿命と、システムの年輪
panda728
PRO
2
140
LLMによるContent Moderationの本番運用の裏側と品質担保への挑戦
suikabar
3
860
信頼性について考えてみる(SRE NEXT 2026 miniLT)
hayama17
0
190
関数型プログラミングのメリットって何だろう?
wanko_it
0
180
Featured
See All Featured
Balancing Empowerment & Direction
lara
6
1.2k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
410
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.7k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
340
Agile that works and the tools we love
rasmusluckow
331
22k
Practical Orchestrator
shlominoach
191
11k
The World Runs on Bad Software
bkeepers
PRO
72
12k
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
450
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.7k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
230
23k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
590
Google's AI Overviews - The New Search
badams
0
1.1k
Transcript
XR Interaction Toolkit 1.0.0-pre で VR 開発してみよう Cyber Agent unity
#1 Lighting Talk
自己紹介 【名前 / ハンネ / Twitter】 Denik / デニキ /
@xrdnk 【職歴】 TIS 株式会社 19年度入社 インキュベーションセンター 新規事業開発 XR チーム - XR エンジニア (20.5 ~ 現在) - システムエンジニア (19.04 ~ 20.05) 本発表は個人の見解です. 所属組織の意見云々ではありません.
アジェンダ ➢ XR Interaction Toolkit の説明 ➢ XR Interaction Toolkit
の機能紹介 ➢ XR Interaction Toolkit 応用サンプル紹介 ➢ おわりに
XR Interaction Toolkit の説明
XR Interaction Toolkit とは (1/2) Unity が提供する VR/AR インタラクションシステムのツールキットです. 似たツールとして
Oculus 側が Oculus Integration を提供しています.
XR Interaction Toolkit とは (2/2) 2019年12月頃に preview package として公開され,しばらく update
がありませんでしたが, 2020年10月に version 0.10 が公開され,約10か月振りに新機能が追加されています. また,1.0.0-pre 版が出ており,リリース目前になっています. 本発表では VR 側の機能について説明します. VR 版では以下の機能が提供されています. ➢ Object Interaction ➢ UI Interaction ➢ Locomotion
検証環境 本発表における検証環境は以下の通りです. ➢ Unity 2019.4.17f1 ➢ Universal RP 7.3.1 ➢
XR Interaction Toolkit 1.0.0-pre.2 ➢ Oculus Quest 2 XR Interaction Toolkit は 0.10.0 以後からいくつか機能が追加されています. どのバージョンから対応しているかは右下のラベルのように表示しておきます. 0.9 ~
インストール UPM でインストールします. XR Interaction Toolkit は preview packages であるため,
Advanced > Show preview packages にチェックをする必要があります. 0.9 ~
機能紹介
Interaction
Interactor と Interactable Interactor インタラクションの主体 (コントローラ etc.) Interactable インタラクションの客体 (物体/UIパネル
etc.) Interaction Manager インタラクションシステム の管理クラス OnHover OnSelect OnHover OnSelect 0.9 ~
XR Ray Interactor コントローラから Ray を出せるようになります. Ray を通して 遠隔インタラクションができます. XR
Ray Interactor を用いて VR 物体を遠隔的に掴む【XR Interaction Toolkit】 https://xrdnk.hateblo.jp/entry/2020/08/03/213914 0.9 ~
XR Direct Interactor コントローラで直接インタラクションできるようになります. XR Direct Interactor を用いて VR 物体を直接的に掴む【XR
Interaction Toolkit】 https://xrdnk.hateblo.jp/entry/2020/08/08/183219 0.9 ~
XR Socket Interactor 物体を以前の位置に格納することが出来ます.応用範囲が広いです. XR Socket Interactor を用いて VR 物体を以前の位置に戻す【XR
Interaction Toolkit】 https://xrdnk.hateblo.jp/entry/2021/01/18/195418 0.9 ~
XR Grab Interactable 物体にアタッチすることで掴める物体となります. XR Ray Interactor を用いて VR 物体を遠隔的に掴む【XR
Interaction Toolkit】 https://xrdnk.hateblo.jp/entry/2020/08/03/213914 XR Direct Interactor を用いて VR 物体を直接的に掴む【XR Interaction Toolkit】 https://xrdnk.hateblo.jp/entry/2020/08/08/183219 0.9 ~
XR Simple Interactable Grab 機能のない Interactable です. 掴みたくないけど物体を Interactable にしたい場合に利用します.
0.9 ~
Interactor / Interactable Events HoverEntered HoverExited SelectEntered SelectExited 0.9 ~
Audio / Haptic Events HoverEntered HoverExited SelectEntered SelectExited 0.9 ~
Events をスクリプトで発火 勿論 Events はスクリプトを通して発火できます. スクリプトを通して Interactor Events / Interactable
Events にイベントを登録する【XR Interaction Toolkit】 https://xrdnk.hateblo.jp/entry/2021/02/06/174354 0.9 ~
Locomotion
Locomotion System XR Interaction Toolkit では以下の Locomotion System が提供されています. 0.9
以前 ➢ Snap Turn (瞬発的な視点回転移動) ➢ Teleportation (テレポート/ワープ/ブリンク) 0.10 以後追加 ➢ Continuous Turn (連続的な視点回転移動) ➢ Continuous Move (移動処理) 0.9 ~
Snap Turn Provider 瞬発的な視点回転処理を行うことが出来ます. Snap Turn Provider (Device-based) を利用して VR
視点を回転させる【XR Interaction Toolkit】 https://xrdnk.hateblo.jp/entry/2021/01/19/074338 0.9 ~
Teleportation Provider テレポート処理を提供します. テレポート先の判定は「平面」のArea,「点」のAnchor の2種類があります. Teleportation Area Teleportation Anchor XR
Interaction Toolkit を用いたテレポート/ワープ処理の実装方法【XR Interaction Toolkit】 https://xrdnk.hateblo.jp/entry/2021/02/02/073415 0.9 ~
Teleportation Configuration / Match Orientation テレポート処理後の向きの設定です.どの方向に合わせるか. 0.9 以前と 0.10 以後で
Enum の内容が変わっていますので注意. World y Axis y x z World Space Up ワールド空間のy軸に合わせる World y Axis y x z Target Up ワープ先のy軸に合わせる World y Axis y x z Target Up and Forward ワープ先のyz軸に合わせる World y Axis y x z None ワープ処理前の向きと同じ 0.10 ~
Continuous Turn Provider VR空間内で連続的な視点回転処理を実行します. Continuous Turn Provider (Device-based) を用いて VR
空間内での連続的な視点回転処理を行う【XR Interaction Toolkit】 https://xrdnk.hateblo.jp/entry/2021/01/30/204617 0.10 ~
Continuous Move Provider VR空間内で移動処理を実行します. Enable Strafe 横移動(ストライフ移動)を有効にするか設定. チェックを外すと前後移動しかできなくなります. Continuous Move
Provider (Device-based) を用いて VR 空間内で移動処理を行う【XR Interaction Toolkit】 https://xrdnk.hateblo.jp/entry/2021/01/28/215255 0.10 ~
Character Controller Driver Character Controller の Height を現実の頭部位置に合わせて自在に調整します. Character Controller
Driver を利用して Character Controller の Height を現実の頭部位置に合わせて自在に調整する【XR Interaction Toolkit】 https://xrdnk.hateblo.jp/entry/2021/02/01/080000 適用前 適用後 0.10 ~
Input System Package 対応 (Action-based) Input System Package 対応版が追加されました. 対応しているのはコントローラ操作機能.
➢ XR Controller ➢ Continuous Move Provider ➢ Continuous Turn Provider ➢ Snap Turn Provider XR Interaction Toolkit を Input System (Action-based) で利用する【XR Interaction Toolkit】 https://xrdnk.hateblo.jp/entry/2021/02/10/000000 Input Manager 版 は Device-based になっている Input System 版 は Action-based になっている 0.10 ~
XR Device Simulator Editor 上で VR コントローラ操作を行うことができます. VR 機器を所持していなくても疑似的に操作することが可能に. Input
System Package に対応している場合のみに利用できます. (Input Manager 版だと利用できません) 操作方法の例 ➢ Shift キー: 左コントローラ操作 ➢ Space キー: 右コントローラ操作 ➢ Shift + WASD: 左コントローラのスティック操作 ➢ Space キー + WASD: 右コントローラのスティック操作 XR Device Simulator を利用してマウスキーボードでVRアプリ内の操作を行う【XR Interaction Toolkit】 https://xrdnk.hateblo.jp/entry/2021/02/12/200000 0.10 ~
応用サンプル紹介
リストポケット Socket Interactor を継承して独自クラスを作れば,こんな応用もできます. 手首に物を収納できるリストポケットです. How to Create Wrist Pockets
for Unity XR https://youtu.be/JmaAHyNvA98 0.9 ~
両手持ち物体 XR Grab Interactable を拡張すれば,両手持ち物体の実装も出来ます. 右手で銃を持ち,左手でエイム調整を行うというギミックを搭載することもできます. Two Handed Weapons using
Unity's XR Toolkit https://youtu.be/IX2EUAcocoM 0.9 ~
おわりに
Unity WebXR Unity WebXR 近々 XR Interaction Toolkit 対応 https://twitter.com/marcel_wiessler/status/1356376306968109068
https://twitter.com/marcel_wiessler/status/1359456457226354691
XR Interaction Toolkit Roadmap 将来実装予定 ➢ Remote Input Debugger (リモートインプットデバッガ)
➢ Animated Controller Models (手のモデル) ➢ Articulated Hand Tracking (多関節ハンドトラッキング) ➢ Two Handed Interactions (両手インタラクション) XR Interaction Toolkit Public RoadMap https://portal.productboard.com/unity/4-unity-ar-vr-platform-support/tabs/8-xr-interaction-toolkit フォーラムによれば,XR Interaction Toolkit は Unity 2021.2 で 1.0.0 リリースを目指している模様. XR Interaction Toolkit 1.0.0-pre.2 pre-release is available https://forum.unity.com/threads/xr-interaction-toolkit-1-0-0-pre-2-pre-release-is-available.1046092/
XR Interaction Toolkit 参考資料 ➢ XR Interaction Toolkit – Examples
/ GitHub ← まずはこれ https://github.com/Unity-Technologies/XR-Interaction-Toolkit-Examples ➢ XR Interaction Toolkit Official Document (English) https://docs.unity3d.com/Packages/
[email protected]
/manual/index.html ➢ Andrew 氏の YouTube / GitHub https://www.youtube.com/channel/UCG8bDPqp3jykCGbx-CiL7VQ https://github.com/C-Through ➢ Dilmer 氏の YouTube / GitHub https://www.youtube.com/channel/UCHM37DnT_QGJT5Zyl4EmqcA https://github.com/dilmerv ➢ Unity Learn (現在ほぼ日本語化対応) Escape Room も XRIT 対応
まとめ・所感 ➢ XR Interaction Toolkit を利用すれば VR インタラクションシステムの一通りの実装が出来る ➢ XR
Interaction Toolkit は UPM を利用しているため, Assets にアセットを 置く必要がなく, Oculus Integration に比べてリポジトリの容量が増えない ➢ 最低限のコンポーネントしかないので,機能拡張したい場合は Base を継承するか Oculus Integration 等,他のSDK と組み合わせて使うのが現状か