Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Unity WebXR ExporterでVR刺身タンポポを動かしてみた / Challeng...
Search
korinVR
April 27, 2020
Technology
17k
4
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Unity WebXR ExporterでVR刺身タンポポを動かしてみた / Challenge to use Unity WebXR Exporter for VR Sashimi Tanpopo
korinVR
April 27, 2020
Other Decks in Technology
See All in Technology
cdk deployとcdkd deploy、実際にデプロイして5倍速近くの差を実測した
yama3133
1
120
"AWSはちょっと苦手"でも大丈夫。AWS Blocks で手軽に作る Flutter のバックエンド #FlutterKaigi
tacck
PRO
0
110
AWS DevOps Agentはどこまで任せられるか 〜機能の現在地と、機能拡張の実践〜
nyankotaro
0
300
Filter What the LLM Reads: RAG Governance with AgentCore Gateway
yakumo
1
130
クラウドエージェントの先駆け Devin。今も最先端を走る、他との違い
kinopeee
1
510
データマネジメント × 法務で作りあげる、 freeeの新しいデータガバナンスへの軌跡
freee
PRO
2
560
Obsidian Vault Architectures
x5gtrn
PRO
0
210
Vue で書く 空間コンピューティング、TresJS と WebXR を使ったXR デバイスのフロントエンド開発
hiranuma
0
130
Vue.jsのGitHubから学ぶ意思決定
yut0naga1_fa
1
340
デザインレビューは自動化できるのか?─ Flutter × Figma で UI 品質保証を考える
techiro
2
570
AI AgentによるEmbedded SREの取り組み
tgidgd
1
200
Agent × Maestro で始める モバイル E2E 端末準備からテスト実行・結果確認まで
sansantech
PRO
0
230
Featured
See All Featured
Git: the NoSQL Database
bkeepers
PRO
433
67k
What does AI have to do with Human Rights?
axbom
PRO
1
2.5k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
730
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.6k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
510
Scaling GitHub
holman
464
140k
Navigating Team Friction
lara
192
16k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2.2k
Building Adaptive Systems
keathley
44
3.3k
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.6k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
590
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
430
Transcript
Unity WebXR Exporterで VR刺身タンポポを動かしてみた こりん(@korinVR) WebXR Tech Tokyo #0 @
cluster 2020/04/27
自己紹介 本名 古林 克臣(こばやしかつおみ) ハンドル こりん(@korinVR) 職業 Unityエンジニア 所属 株式会社エクシヴィ
主な個人VR作品 - 3D駐車シミュレーター - VRちゃぶ台返し - パラレルパラソル(仮) - VR刺身タンポポ etc...
今日の題材 VR刺身タンポポ
VR刺身タンポポをQuestでリリースしたい 流れてくる刺身にタンポポをのせるだけの簡単なお仕事 イベントで展示したり、Windows実行ファイルを配布 本当はOculus Storeできちんと出したい ストアがゲーム機並みに厳しくこんなネタアプリは通らない WebXR!
WebXR版の実現方法 最初はA-FrameとA-Frame Physicsを使って ゼロから作り直すつもりだった……が 4月8日、MozillaのUnity WebXR Exporterが 突然のメジャーアップデート
WebXR版の実現方法 ブログエントリを読んだらQuestへの言及がある! ので、試しに使ってみることに
Unity WebXR Exporterについて UnityのWebGL出力をWebXR APIでVRに対応させる Asset StoreとGitHubにある。ドキュメントはGitHub参照
Unity WebXR Exporterの使い方(概略) 1. Universal Render Pipelineの新規プロジェクトを作成 2. Virtual Reality
Supportedをオン 3. プラットフォームをWebGLにする 4. Unity WebXR Exporterをインポート 5. InputManager.assetを入れ替え 6. Main Cameraを削除してWebXRCameraSetを配置 7. WebGL Templateをアセット付属の「WebXR」に設定 これでビルドすればオーケー!
注意:WebXR APIはHTTPSが必要 Build & Runで起動するローカルHTTPサーバーでは 正常に動作しない npmの http-server -S 等で動かす必要あり
(下記ページを参考に) node.js - npm http-server with SSL - Stack Overflow https://stackoverflow.com/questions/35127383/npm-http-server-with-ssl
ビルドしたアプリをウェブで公開するには HTTPSのウェブサイトを立ち上げる 今回はAWS Route 53でドメインを新規に取得し、 S3+CloudFront+Certificate Managerを使用 UnityでWebGL出力したフォルダをまるごと aws s3
sync コマンドでアップロード・更新 サイズが大きいのでバズる可能性があるなら転送料金に注意
Oculus Questでの動作画面
動作の所感
Oculus Questでの動作:起動時間 VR刺身タンポポの場合、WebGL出力のサイズは12MBほど ページを開いて起動に約20秒かかる おそらくほぼWebAssemblyのパース・コンパイル時間 将来的にはPCブラウザ同様 数秒で起動するようになるはず ロード画面を調整したほうがよさそう
Oculus Questでの動作:フレームレート フレームレートが低い(20~30fpsくらい?) Issueが立っていて、フォークされているバージョンでは 改善されているという話も。おそらく一時的な不具合
Chrome 81での動作 chrome://flags の下記設定でVRモードに入れる ……がヘッドセットの中に何も映らない(Rift SもViveも) (何か間違ってる気がする)
Firefoxでの動作 VRのパーミッションをRememberをチェックして 記憶させてからページをリロードする必要がある……。
現在のステータス: とりあえずQuestでは動く……! 何かcontributeしたいですね
Unity WebXR Exporterの注意点
注意1:WebXRCameraSetについている手 Takeモーションで指3本を曲げるだけの単純なもの WebXRCameraSet単体だと、トリガーの状態に関わらず Takeが再生されて指3本が曲がった状態で固定されてしまう →DesertControllerInteraction.cs を参考に解決 たぶん手は自前で 用意したほうがいい
注意2:コントローラーの角度 Unity上で実行したときと、ブラウザで実行したときで コントローラーの角度が大きく違う プラットフォームを判定してずらす必要がありそう
注意3:シーンロードしないこと SceneManager.LoadSceneでシーンを遷移・リロードすると VRモードが解除される=止まってしまう VR刺身タンポポではリスタート時にシーンリロードしていた LoadSceneせずに初期状態に戻るように書き直した 基本1シーンで作る必要がありそう
注意4:WebXRCameraSetの名前を変えない 動かなくなる。エディタで実行すると下記エラーが出る The webxr.js script requires the WebXRManager gameobject to
be named WebXRCameraSet for proper functioning UnityEngine.Debug:LogError(Object) WebXR.WebXRManager:Awake() (at Assets/WebXR/Scripts/WebXRManager.cs:110)
Oculus QuestでVR刺身タンポポ 試してみたい?
Questのブラウザを開いて、アドレスバーに バーチャルキーボード右下の「.com」キーを使うと楽です! 遊んでみてね! アプデしていきます! vrsashimi.com Oculus QuestでVR刺身タンポポ こりん(@korinVR)