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
ココがダメだよWebCamTexture
Search
Masaya Yashiro
June 21, 2017
Technology
0
75
ココがダメだよWebCamTexture
イケてないと悪評高いUnityのWebCamTextureを使ってみたので、ダメな部分を紹介します。
Masaya Yashiro
June 21, 2017
Tweet
Share
More Decks by Masaya Yashiro
See All by Masaya Yashiro
拡大期を迎えたプロダクトに起きたこと - Android編
yashims
0
460
How useful Kotlin/Native in Kotlin 1.3
yashims
0
370
UX design trend 2019
yashims
5
1.5k
Kotlin/MPP getting started and troubles
yashims
0
3.7k
C# code refactoring with Scope Functions
yashims
0
2.7k
Introduction of MaterialDesign for engineer
yashims
0
91
Other Decks in Technology
See All in Technology
AI研修【MIXI 24新卒技術研修】
mixi_engineers
PRO
0
130
スタートアップにおける組織設計とスクラムの長期戦略 / Scrum Fest Kanazawa 2024
yoshikiiida
13
3.6k
開発と事業を繋ぐ!SREのオブザーバビリティ戦略 ~ Developers Summit 2024 Summer ~
leveragestech
0
630
Git 研修 Advanced【MIXI 24新卒技術研修】
mixi_engineers
PRO
0
200
CEL(Common Expression Language)で書いた条件にマッチしたIAM Policyを見つける / iam-policy-finder
fujiwara3
0
710
テスト・設計研修【MIXI 24新卒技術研修】
mixi_engineers
PRO
0
170
Amazon FSx for NetApp ONTAPのパフォーマンスチューニング要素をまとめてみた #cm_odyssey #devio2024
non97
0
220
GoとアクターモデルでES+CQRSを実践! / proto_actor_es_cqrs
ytake
1
160
地理情報とAPIのトレンド
nagix
0
160
可視化プラットフォームGrafanaの基本と活用方法の全て
hamadakoji
0
230
コンテナ・K8s研修 - 後半 Kubernetes 基礎&ハンズオン【MIXI 24新卒技術研修】
mixi_engineers
PRO
1
120
楽しくGoを学び合う、LayerXの勉強会文化 / LayerX's study culture of having fun and learning Go together
ar_tama
2
350
Featured
See All Featured
A Tale of Four Properties
chriscoyier
155
22k
The Invisible Side of Design
smashingmag
294
50k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
155
14k
The World Runs on Bad Software
bkeepers
PRO
63
11k
Practical Orchestrator
shlominoach
185
10k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
189
16k
Build The Right Thing And Hit Your Dates
maggiecrowley
28
2.2k
Faster Mobile Websites
deanohume
303
30k
Why Our Code Smells
bkeepers
PRO
332
56k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
353
29k
Learning to Love Humans: Emotional Interface Design
aarron
269
39k
Building Applications with DynamoDB
mza
89
5.8k
Transcript
ίί͕μϝͩΑ WebCamTexture @yashims85
ήʔϜҎ֎ͰUnity
ήʔϜҎ֎ͰUnity "OESPJEJ04྆ରԠ 6*ΤσΟλ σόΠεػೳ
ͳΜ͔ͩΜͩ ήʔϜҎ֎࡞Γ͍͢
ΧϝϥΞϓϦ
WebCamTextureͱ
WebCamTexture • Unityඪ४ͷσόΠεΧϝϥAPI • Χϝϥͷө૾͕Ϩϯμʔ͞ΕΔTextureͷࢠΫϥε • Android/iOS/Editor্Ͱͳ͘ಈ͘ • ྑ͍ᷚฉ͔ͳ͍ •
ΧϝϥΞηοτങ͏ʹͯ͠ɺҰWebCamTexture ͬͯΈͳ͍ͱͲ͏͍͏ͷ͕ཉ͍͔͔͠Βͳ͍
͍ํ private struct Fhd { public const int Width =
1920; public const int Height = 1080; } private int Fps = 30; private WebCamTexture WebCam { get; set; } void Start() { WebCam = new WebCamTexture( WebCamTexture.devices[0].name, Fhd.Width, Fhd.Height, Fps ); WebCam.Play(); } private void OnDestroy() { WebCam.Stop(); Destroy(WebCam); }
؆୯ͩʔ
ͳΜ͔ΊͬͪΌॏ͍ (ϊʔϚϧͷΧϝϥΞϓϦͱൺͯ)
ͳΜ͔ΊͬͪΌॏ͍ private struct Fhd { public const int Width =
1920; public const int Height = 1080; } private int Fps = 8; private WebCamTexture WebCam { get; set; } void Start() { WebCam = new WebCamTexture( WebCamTexture.devices[0].name, Fhd.Width, Fhd.Height, Fps ); WebCam.Play(); }
·ͩʹΑͬͯॏ͍
·ͩʹΑͬͯॏ͍ private struct Hd { public const int Width =
1280; public const int Height = 720; } private int Fps = 8; private WebCamTexture WebCam { get; set; } void Start() { WebCam = new WebCamTexture( WebCamTexture.devices[0].name, Hd.Width, Hd.Height, Fps ); WebCam.Play(); }
ͳΜ͔Portraitͷ࣌ө૾͕ߥ͍
ͳΜ͔Portraitͷ࣌ө૾͕ߥ͍ private struct Hd { public const int Width =
720; public const int Height = 1280; } private int Fps = 8; private WebCamTexture WebCam { get; set; } void Start() { WebCam = new WebCamTexture( WebCamTexture.devices[0].name, Hd.Width, Hd.Height, Fps ); WebCam.Play(); }
औಘग़དྷΔΞεൺ͕ มΘΒͳ͍ΜͰ͕͢
มΘΒͳ͍Ξεൺ ཉ͍͠Ξεൺ ฦͬͯ͘Δө૾ͷΞεൺ Y ԣ')% Y ԣ')% Y ॎ')% Y
ԣ')% Y ')%ล Y ԣ')% Y )%ล Y ԣ)%
LandscapeͰ͔͠ը૾͕औΕ ͳ͍ͷͰCenterCrop͢Δ͠ ͔ͳ͍
LandscapeͰ͔͠ը૾͕औΕ ͳ͍ͷͰCenterCrop͢Δ͠ ͔ͳ͍
࠷ऴతͳPortraitͷղ૾ • VGA: 640x480 QY QY ࢀߟ
WebCamTextureΫι͞·ͱΊ • VGAҎԼΛ֮ޛ • 15FPS(ྲྀੴʹϠόΠͷͰεϖແࢹ͠ ͯͪΐͬͱͨ͠) • ి৯͏
ͦ͏ͩ AssetΛങ͓͏
NatCamΛങͬͨ • https://www.assetstore.unity3d.com/jp/#!/content/52154 • ͑ͯͳ͍͚Ͳɺ৭ʑߴػೳ • iOS/AndroidରԠ • FaceTrackingͰ͖Δ •
Texture2Dͷอଘαϙʔτ • MovieՄ
݁ՌɺͲ͏͔ͩͬͨ
Ͱ͖ͨ • FPS্͕ • ߴղ૾Ͱॏ͘ͳΒͳ͍ • ফඅిྗݮ
Ͱ͖ͳ͔ͬͨ • औಘղ૾ࢦఆ • 16:9ղ૾͔͠ϓϦηοτͰ༻ҙ͞Εͯͳ ͍ • มߋग़དྷΔ͔ະݕূ
͋Δఔͷ࣭UP
·ͱΊ WebCamTextureΛϞόΠϧͰ͏߹ɺੑ ೳ໘ͰͭΒΈ͕͋Δɻ ͓·͚Ͱ͏ͳΒྑ͍͕ɺओཁػೳͷ߹ AssetΛೖΕͨ΄͏͕ྑ͍ɻ