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
軽率に足を踏み入れる WebXR実験的機能の世界/dive-into-webxr-device...
Search
にー兄さん
December 15, 2022
Technology
0
370
軽率に足を踏み入れる WebXR実験的機能の世界/dive-into-webxr-device-api-experimental-features
XR Kaigi 2022のコミュニティオーガナイズドセッション(WebXR Tech Tokyo+Babylon.js勉強会)で登壇した資料です
にー兄さん
December 15, 2022
Tweet
Share
More Decks by にー兄さん
See All by にー兄さん
軽率にAndroidXRのJetpack SceneCoreを使って3Dモデルを表示してみる / androidxr-scenecore-3dmodels
drumath2237
0
35
UnJSを使って軽率にCLIを作ってみたらめちゃくちゃ便利だった / create CLI with UnJS
drumath2237
4
1.5k
create-babylon-appを軽率にアプデしたい / update create babylon app
drumath2237
1
1.6k
Babylon.js 7注目機能を 軽率にまとめてみる/whats-new-in-babylonjs-v7
drumath2237
1
320
軽率にVFX Graphと Compute Shaderを 組み合わせるテクニック/integrate-vfxgraph-and-compute-shader
drumath2237
1
400
軽率にVue 3で リアルタイム3Dアプリを作れる ライブラリを作ってみた/vue-with-3d-app
drumath2237
3
1.9k
軽率にBabylon.jsを C#で使う技術 / using-babylonjs-with-csharp
drumath2237
1
870
今こそ軽率に理解したい WebXR Device APIとBabylon.jsの話 / understand-webxr-device-api-and-babylonjs
drumath2237
0
220
Vue・Babylon連携ライブラリ BabyuewJSについて / about-babyuewjs
drumath2237
0
190
Other Decks in Technology
See All in Technology
JAWS DAYS 2025 アーキテクチャ道場 事前説明会 / JAWS DAYS 2025 briefing document
naospon
0
150
偏光画像処理ライブラリを作った話
elerac
1
180
30→150人のエンジニア組織拡大に伴うアジャイル文化を醸成する役割と取り組みの変化
nagata03
0
190
【詳説】コンテンツ配信 システムの複数機能 基盤への拡張
hatena
0
270
OPENLOGI Company Profile
hr01
0
60k
ExaDB-XSで利用されているExadata Exascaleについて
oracle4engineer
PRO
3
260
IAMのマニアックな話2025
nrinetcom
PRO
5
1.1k
スキルだけでは満たせない、 “組織全体に”なじむオンボーディング/Onboarding that fits “throughout the organization” and cannot be satisfied by skills alone
bitkey
0
190
Apache Iceberg Case Study in LY Corporation
lycorptech_jp
PRO
0
340
Pwned Labsのすゝめ
ken5scal
2
460
入門 PEAK Threat Hunting @SECCON
odorusatoshi
0
170
Share my, our lessons from the road to re:Invent
naospon
0
150
Featured
See All Featured
Product Roadmaps are Hard
iamctodd
PRO
50
11k
Large-scale JavaScript Application Architecture
addyosmani
511
110k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
129
19k
Designing on Purpose - Digital PM Summit 2013
jponch
117
7.1k
Building Better People: How to give real-time feedback that sticks.
wjessup
367
19k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
How to Think Like a Performance Engineer
csswizardry
22
1.4k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
2.1k
Faster Mobile Websites
deanohume
306
31k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
4
380
Making Projects Easy
brettharned
116
6k
Building Applications with DynamoDB
mza
93
6.2k
Transcript
軽率に足を踏み入れる WebXR実験的機能の世界 にー兄さん(@ninisan_drumath) XR Kaigi 2022 コミュニティオーガナイズドセッション
発表資料は公開します👍 スクショ等のSNS共有OKです📸
にー兄さん(@ninisan_drumath) エンジニア(学生) ロケーションベースAR / Unity / WebAR / Babylon.js /
Azure Kinect 最新技術を使ったデモンストレーションが好き - 筑波大学 情報科学類 - 株式会社ホロラボ アルバイト - Microsoft 学生アンバサダー - Iwaken Lab
アジェンダ - WebXR Device APIと実験的機能 - WebXR実験的機能を使う準備 - Raw Camera
Access ModuleとImmersalによるWebVPS - Depth Sensing Moduleによる深度値の取得 - おわりに
WebXR Device APIとその実験的機能
WebブラウザにおけるAR/VRの標準機能 Webブラウザが提供しているXRに関する機能群 →WebXR Device API スマートフォンやMeta Quest・HoloLensなどのHMDでも ブラウザが対応していれば動作する W3Cの中のImmersive WebというWG
が標準化を行っている https://immersiveweb.dev/
WebXR Device APIの機能群 Moduleという単位で機能が提供されている - Hit Test - Plane Detection
- Hand Tracking - Light Estimation - DOM Overlay - etc ……
実験的機能 Moduleの中でも - 安定版としてリリースされていないもの - ごく一部の環境のみで動作するもの ここでは、これらを実験的機能と呼ぶ (とはいえWebXR Device API自体がまだ広く普及していない……)
WebXR実験的機能を使う準備
まずはWebXR Device API実験的機能を使う準備 まずWebXR Device APIが使える必要がある セキュリティの観点からhttps配信が必須になる 動作するデバイスも必要 →ARCore対応AndroidのGoogle Chromeがあると良い
WebGLライブラリと組み合わせるのが吉 → 個人的には Babylon.jsがおすすめ
Babylon.jsとWebXR Babylon.jsは高機能なWebGLライブラリ 特にWebGL APIに詳しくなくても使えるし Babylon.js自体の表現力も高い WebXR Device APIを使いやすくラップしたAPIを提供 詳しくは本を書きましたのでぜひ(宣伝)→ https://doc.babylonjs.com/
const xr = await scene.createDefaultXRExperienceAsync();
デモプロジェクトのご紹介
いままで制作してきたWebARのデモをご紹介 WebXR Device APIの最新機能を使ったデモを2種類 - Raw Camera Access ModuleとImmersalによるWebVPS -
Depth Sensing Moduleによる深度値の取得
Raw Camera Access Moduleと ImmersalによるWebVPS
Raw Camera Access Module WebARアプリからカメラ情報にアクセスできるAPI ARCore対応AndroidデバイスのChromeで動作(2022年現在) カメラのRGB画像をWebGLTextureとして取得したり、 カメラの内部パラメータを取得したりするのに使用 詳しくは記事をご参照ください→ https://zenn.dev/drumath2237/articles/52d62638c7d06f
WebVPSのデモンストレーション ImmersalというVPSを使用 カメラ画像とパラメータが必要だったので Raw Camera Accessによって取得している GitHubでプロジェクトを公開してます https://github.com/drumath2237/immersal-babylon-webxr
Depth Sensing Moduleによる深度値の取得
Depth Sensing Module WebARアプリから深度値を取得できるAPI ARCore対応AndroidのChromeで動作(2022年現在) カメラ画角における深度値を取得できる CPU / GPUモードの2種類があり、得られるデータが違う
深度値取得のデモンストレーション Depth Sensingで取得した深度値配列を Depth画像としてCanvasに描画している GitHubでプロジェクトを公開してます https://github.com/drumath2237/webxr-depth-testbed-babylon
おわりに
まとめ - WebXR Device APIはブラウザが提供するWebXRに関する機能 - そのなかに実験的な機能がある - 2つの事例を紹介 -
Raw Camera Access - Depth Sensing
参考文献 WebXR Proposals https://storage.googleapis.com/chromium-webxr-test/r1067245/proposals/index.html Immersive Web Developer Home https://immersiveweb.dev/ WebXR
Samples https://immersive-web.github.io/webxr-samples/ Raw Camera Accessのexplaner https://github.com/immersive-web/raw-camera-access/blob/main/explainer.md Depth Sensingのexplaner https://github.com/immersive-web/depth-sensing/blob/main/explainer.md