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
Claude Code本は、どのように執筆チームで書かれたか
oikon48
0
300
LocalStack を使ったサーバーレスアプリケーション開発 / Serverless Development with LocalStack
kakakakakku
1
280
ファミコンでPHPを動かす / PHP on the Famicom side b
tomzoh
0
140
Google Cloud Next Tokyo 26登壇時のスクリプト
recruitengineers
PRO
0
210
初対面のメンバーがチームを組み、Claude Codeでゼロからサービスをリリース
mkdev10
0
100
Execution in the Kingdom of Agents: Reflections on Abstraction and Complexity
bcantrill
0
870
OSC2026on_the-world-is-waiting-for-your-voice.pdf
naruoga
0
360
Snowflake Horizon Catalog と Apache Iceberg で作る オープンなデータ基盤
kitagawaz
0
460
SDDの運用にめげずに向き合った話
sansantech
PRO
1
140
Codex概要
ymiya55
0
460
Incremental HTTP
kazuho
5
2.1k
FinTech 1-2 : Overview of FinTech
ks91
PRO
0
150
Featured
See All Featured
KATA
mclloyd
PRO
35
16k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
1
620
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.8k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
350
XXLCSS - How to scale CSS and keep your sanity
sugarenia
250
1.3M
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
570
30 Presentation Tips
portentint
PRO
1
420
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.4k
Designing for Timeless Needs
cassininazir
1
520
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.4k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
320
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)