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
URP/HDRPを使ったVRM対応アプリの開発方法 / VRM Importer Extension
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
sotanmochi
March 31, 2021
Technology
1.8k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
URP/HDRPを使ったVRM対応アプリの開発方法 / VRM Importer Extension
第5回 VRM勉強会 LT資料
sotanmochi
March 31, 2021
Transcript
17 slides
URP/HDRPを使った VRM対応アプリの開発方法 2021/03/31 Soichiro Sugimoto sotan(@sotanmochi)
自己紹介 2 @sotanmochi xR系Unityエンジニアの端くれ xRに関連する新規事業開発・研究開発など 個人開発しているアプリを年内にリリースしたい
今回話すこと VRMモデルをインポートする時に任意のシェーダーを適用する方法 - URP/HDRPに対応したトゥーンシェーダーが使える - Built-in Render PipelineでMToon以外のシェーダーが使える 3
背景 Visual Effect Graphと組み合わせたVRMアプリを作りたい 4
デモ VRMモデルをインポートしてUniversal ToonまたはReal Toonを適用する - Unity Editor上でプロジェクトにインポート - ビルドしたアプリでランタイムインポート 5
具体的な実装方法 1. VRMMaterialImporterを継承したクラスを作成 - CreateMaterialメソッドをオーバーライドする - マテリアルの変換処理を実装する 2. VRMImporterContextを継承したクラスを作成 -
ParseJsonメソッドをオーバーライドする - MaterialImporterの設定処理を実装する 3. VRMをインポートするクラスを実装する 6
1. VRMMaterialImporterを継承したクラスを作成 VRMMaterialImporter.CreateMaterialメソッドをオーバーライドする 7
1. VRMMaterialImporterを継承したクラスを作成 VRMMaterialImporter.CreateMaterialメソッドをオーバーライドする 8
CreateMaterialメソッドにマテリアルの変換処理を実装する 主なシェーダープロパティの対応表 Universal Toon Shader RealToon (URP) MToon _MainTex _MainTex
_MainTex _BaseColor _MainColor _Color _1st_ShadeMap _ShadeTexture _1st_ShadeColor _OverallShadowColor _ShadeColor _Cutoff _Cutout _Cutoff _BaseShade_Feather 1.0 - _ShadeToony _NormalMap _NormalMap _BumpMap _BumpScale _NormalMapIntensity _BumpScale _Emissive_Tex _GlossTexture _EmissionMap _Emissive_Color _GlossColor _EmissionColor Universal Toon Shader RealToon (URP) MToon _MatCap_Sampler _MCap _SphereAdd _RimLightColor _RimLightColor _RimColor _OutlineTex _OutlineWidthControl _OutlineWidthTexture _Outline_Width _OutlineWidth _OutlineWidth _Outline_Color _OutlineColor _OutlineColor 1. VRMMaterialImporterを継承したクラスを作成 9
CreateMaterialメソッドにマテリアルの変換処理を実装する 1. VRMMaterialImporterを継承したクラスを作成 10 VRM Universal Toon
2. VRMImporterContextを継承したクラスを作成 VRMImporterContext.ParseJsonメソッドをオーバーライドする MaterialImporterの設定処理を実装する 11
3. インポート処理を実装 実装例 12
その他Tips ビルドしたアプリでランタイムインポートする場合は、 必要なShaderVariantがストリッピングされないようにする。 方法: ・Unity Editorでインポートしたモデルをプロジェクトに含める ・Resourcesフォルダにマテリアルを配置する など 参考情報: ShaderVariantについて~中編:AssetBundleとShaderVariantの関係~
https://note.com/wotakuro/n/n5bbd88c62d61 13
具体的な実装方法(再掲) 1. VRMMaterialImporterを継承したクラスを作成 - CreateMaterialメソッドをオーバーライドする - マテリアルの変換処理を実装する 2. VRMImporterContextを継承したクラスを作成 -
ParseJsonメソッドをオーバーライドする - MaterialImporterの設定処理を実装する 3. VRMをインポートするクラスを実装する 14
ライブラリを公開しました VRM Importer Extension for Unity URP https://github.com/sotanmochi/VRMImporterExtension-URP 利用可能なシェーダー: ・Universal
Toon Shader 2.2.1 ・RealToon Shader 5.0.8 ・URP: ランタイムインポートはデバッグ中 ・HDRP: 開発中 動作確認環境: ・Unity 2019.4 + URP 7.5.2 + UniVRM 0.66.0 15
おわりに VRMモデルをインポートする時に任意のシェーダーを適用する方法を紹介した - URP/HDRPに対応したトゥーンシェーダーが使える - Built-in Render PipelineでMToon以外のシェーダーが使える URP/HDRPを使ってVRMアプリを作りましょう! 16
ありがとうございました
More Decks by sotanmochi
See All by sotanmochi
画像処理から始めるコンピュートシェーダ / Introduction to Image Processing using Compute Shader
sotanmochi
2
2.8k
Diminished Reality 入門 / Introduction to Diminished Reality
sotanmochi
2
9.7k
Unityでテクスチャにお絵描きするための線分描画アルゴリズムの話 / Line drawing algorithm using fragment shader
sotanmochi
2
4.1k
MagicOnionでマルチプレイゲームを作ってみる / Introduction to developing multiplayer games using MagicOnion
sotanmochi
1
2.7k
SmartRig Bipedを使ってみよう / Introduction to SmartRig Biped
sotanmochi
0
3.6k
VRMを使ったAR/MR撮影ツールを試作開発してみた話 / Prototype of Mobile Mixed Capture
sotanmochi
0
1.9k
リアルとバーチャルの融合によって越えられない壁を壊す / TechCafe vol.8 LT
sotanmochi
0
310
ユニティちゃんと鬼ごっこができるMRゲームと戦術位置解析システム / Mixed reality game and tactical position analysis
sotanmochi
0
770
Research modeで取得した深度(Depth)データを可視化する / Depth data visualization for Hololens RS4 Research mode
sotanmochi
0
220
Other Decks in Technology
See All in Technology
ワークフローからハーネスへ — Web フレームワークの作者たちが AI エージェントに向かう理由
azukiazusa1
4
2.5k
Welcome JXL!
dynamis
0
350
Del vibe coding a un Desarrollo (agéntico) fiable
jcabot
0
230
Libérez Firefox et Thunderbird avec nos astuces
hellosct1
0
200
20261119_AgentCore
takuyay0ne
2
310
AWS Blocksで AIエージェント作れるの知ってます?
kmiya84377
1
170
データから見る AI時代のエンジニア転職と採用
junya_okura
4
1.4k
AI-Ready なデータ基盤ってなに? & 新卒未経験が、いま考えていること
imuta
0
1.1k
gradle-best-practices 使ってみた
mikanichinose
0
240
現地速報! Microsoft Ignite アップデートレポート
kasada
1
470
MCPでネットワーク障害調査を自動化する前に直すべき3つのこと
yama3133
1
670
AWS re:Invent 2026 FSI Pre-Event Networking Night
junjikoide
0
270
Featured
See All Featured
A Modern Web Designer's Workflow
chriscoyier
699
190k
How to Think Like a Performance Engineer
csswizardry
28
3k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.4k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
50
10k
Rails Girls Zürich Keynote
gr2m
96
14k
KATA
mclloyd
PRO
35
16k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.9k
So, you think you're a good person
axbom
PRO
2
2.3k
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
6
970
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
330
The agentic SEO stack - context over prompts
schlessera
0
1k
The Art of Programming - Codeland 2020
erikaheidi
57
15k