Upgrade to Pro — share decks privately, control downloads, hide ads and more …

OculusQuest完全に理解した。 / Oculus Quest Completely Understood.

OculusQuest完全に理解した。 / Oculus Quest Completely Understood.

xR Tech Tokyo #16 @ DMM.comでの登壇資料です。
https://vrtokyo.connpass.com/event/129570/

3009eedce0d0f7ae45987a7bd8f57b85?s=128

Nakaji Kohki

June 23, 2019
Tweet

More Decks by Nakaji Kohki

Other Decks in Technology

Transcript

  1. Confidential - Do Not Share !1 OculusQuest ׬શʹཧղͨ͠ xR Tech

    Tokyo #16 @DMM.com ɹɹpresented by ɹ@nkjzm
  2. !2 Who is @nkjzm ? Nakaji Kohki / ϦϦΧͪΌΜ
 Mercari,

    Inc. R4D XR Engineer ೔ຊόʔνϟϧϦΞϦςΟֶձೝఆ VRٕज़ऀ ΞϛϡʔζϝϯτϝσΟΞ૯߹ֶӃ ήʔϜϓϩάϥϚʔֶՊ VRઐ߈ ߨࢣ ஶॻ: ٕज़ධ࿦ࣾʰVRΤϯδχΞཆ੒ಡຊʱڞஶ ࡞඼: ʰCrevasseʱʰࢸۙڑ཭ΨʔϧVRʱ #xRStreetStyle #xRfm #ϞʔγϣϯΩϟετ Twitter: @nkjzm
  3. !3 #xRStreetStyle

  4. !4 ൃදͷ໨త OculusQuestͷ ։ൃऀΛ૿΍͢

  5. !5 ݕূ࣌ͷόʔδϣϯ • Unity 2018.3.14f1 • Oculus Integration for Unity

    - 1.37 • Oculus Utilities Plugin 1.32.0 • Mac OSX 10.14.4ʢ18E226ʣ • Windows 10 Home (1809)
  6. !6 ຊ೔ͷൃද಺༰ 01 VRλϫʔσΟϑΣϯε 02 OculusQuest։ൃͷجຊ 03 OculusQuestͷ։ൃTIPS 04 OculusQuest׬શཧղʹཧղͨ͠

  7. !7 VRλϫʔσΟϑΣϯε

  8. !8 ຊ೔ͷൃද಺༰ 01 VRλϫʔσΟϑΣϯε 02 OculusQuest։ൃͷجຊ 03 OculusQuestͷ։ൃTIPS 04 OculusQuest׬શཧղʹཧղͨ͠

  9. !9 OculusQuest։ൃͷجຊ ͜Ε͔Β։ൃΛ͸͡ΊΔਓ΁

  10. !10 - OculusQuestຊମ - ໿5ສԁ~ - Android ϕʔεͷVRHMD - PC

    - Mac / Win - Unity - 2017.4 LTS - 2018.4 LTS - 2019.1.2f1 - Android SDK - Oculus Integration ։ൃʹඞཁͳ΋ͷ ಋೖ͸͜ͷهࣄ͕෼͔Γ΍͍͢Ͱ͢ʂ UnityʴOculus Quest ։ൃϝϞ - ϑϨʔϜγϯηγε https://framesynthesis.jp/tech/unity/oculusquest/
  11. !11 1. Unity্Ͱ։ൃ 2. AndroidΞϓϦ(*.apk)ͱͯ͠Ϗϧυ 3. QuestΛ༗ઢ઀ଓ(type-c) 4. adbίϚϯυͰΠϯετʔϧ
 


    5. Quest্Ͱىಈ
 ϥΠϒϥϦ>ෆ໌ͳΞϓϦΑΓ ։ൃ͔Β࣮ػىಈ·ͰͷྲྀΕ $ adb install -r hoge.apk
  12. !12 QuestͷήʔϜ͸า͖ճΕΔͷͰɺϏϧυͷ౓ʹ༗ઢ઀ଓ͢Δͷ͕໘౗ʹͳΔ
 ↓↓↓ ϦϞʔτͰͷΠϯετʔϧ͕Մೳ
 
 tcpϞʔυͰϩʔΧϧωοτϫʔΫܦ༝ͰadbίϚϯυ͕ଧͯΔ έʔεελσΟᶃ ༗ઢ઀ଓ͕໘౗͍͘͞ʂ $ adb

    tcpip 5555
 $ adb connect 192.168.0.0:5555
  13. !13 VRͰͷݟ͑ํ΍ಈ࡞Λ֬ೝ͢ΔͨͼʹϏϧυ͢Δͷ͕໘౗͍͘͞
 ↓↓↓ Rift / Vive / ALVRͰϓϨϏϡʔ͕Մೳʂ - OculusͷSDK͸શOculus੡඼ڞ௨ͳͷͰɺQuestͷػೳ͸RiftͰ΋ಈ͘

    - ΫϩεϓϥοτϑΥʔϜରԠͳͷͰVive΍WinMRͰ΋ಈ͘(ޙड़) - ALVRͰετϦʔϛϯάϓϨϏϡʔͱ͍͏ख΋ έʔεελσΟᶄ ։ൃதʹVRϓϨϏϡʔ͍ͨ͠ʂ
  14. !14 - ALVRͰετϦʔϛϯάϓϨϏϡʔͱ͍͏ख΋ - PCVR(SteamVR)ΛϦϞʔτͰϓϨΠ͢Δ͜ͱͷͰ͖ΔOSS - SteamVRͷήʔϜΛOculus Go/QuestͰϓϨΠ͢Δ͜ͱ΋Մೳ - ϦϙδτϦ


    https://github.com/polygraphene/ALVR/blob/master/README-ja.md έʔεελσΟᶄ ։ൃதʹVRϓϨϏϡʔ͍ͨ͠ʂ
  15. !15 ຊ೔ͷൃද಺༰ 01 VRλϫʔσΟϑΣϯε 02 OculusQuest։ൃͷجຊ 03 OculusQuestͷ։ൃTIPS 04 OculusQuest׬શཧղʹཧղͨ͠

  16. !16 OculusQuestͷ։ൃTIPS ࣮ࡍʹ։ൃͯ͠Έͯ෼͔ͬͨ஌ݟ

  17. !17 VRͰ΍Γ͍ͨجຊతͳػೳ͕
 ͢΂ͯἧ͍ͬͯΔঢ়ଶ - खͰϞϊΛ௫Ή - ςϨϙʔτҠಈ - UIΛૢ࡞͢Δ(uGUI) σϝϦοτ:

    Ҡ২͸େมʹ
 1.31͔Β͸
 ΫϩεϓϥοτϑΥʔϜʹରԠ Oculus Integration͕௒ศརʂʂ OculusͷSampleFrameworkશγʔϯΛQuest࣮ػͰಈ͔ͯ͠Έͨ https://qiita.com/nkjzm/items/58a696f66c4989e5a35c
  18. !18 - OVR Grabbable - ௫·ΕΔΫϥε - OVR Grabber -

    ௫ΉΫϥε खͰϞϊΛ௫Ή
  19. !19 - OVR Grabbable (ӈਤ͸ܧঝͨ͠Ϋϥε) - Snapػೳ: ௫Ή৔ॴΛఆٛՄೳ - Snap

    Offsetʹ஫ҙ - GameObjectͷWorld࠲ඪܥ Ͱͷݪ఺ͱͷڑ཭ = Offset - ͔ͭͬ͑ɾɾɾ - nullͩͱݪ఺ѻ͍ʹͳΔͷͰ ϓϨϋϒࣗମͰҐஔ߹Θͤ खͰϞϊΛ௫Ή
  20. !20 - 2छྨͷΩʔόΠϯυ͕ଘࡏ - Combined - OVRInput.Get(OVRInput.But ton.PrimaryIndexTrigger); - OVRInput.Get(OVRInput.But

    ton.SecondaryIndexTrigger); - Individual - OVRInput.Get(Button.PrimaryIndexTr igger, Controller.LTouch); - OVRInput.Get(Button.PrimaryIndexTr igger, Controller.RTouch); Combined Individual Touchίϯτϩʔϥʔͷࢥ૝
  21. Touchίϯτϩʔϥʔͷࢥ૝ !21 - Individual - OVRInput.Get(Button.PrimaryIndexTrigger, Controller.LTouch); - OVRInput.Get(Button.PrimaryIndexTrigger, Controller.RTouch);

    - ୈೋҾ਺Λ variableʹ͢Δ͜ͱ Ͱɺࠨӈͷ۠ผ͕ͳ͘ͳΔ
 → ϞϊࣗମʹτϦΨʔΛ࣋ͨͤΔ - OVRInputશൠ͕ଟ෼ͦ͏͍͏ࢥ૝ - Hapticsػೳ ͳͲ Individual
  22. Oculusͷ Hapticsػೳ !22 - OVRHaptics (deprecated) - OVRInput Haptics -

    Haptics- Oculus Developers
 https://developer.oculus.com/documentation/unity/latest/concepts/ unity-haptics/ // Start
 OVRInput.SetControllerVibration ( 1, 1, OVRInput.Controller.RTouch); // End
 OVRInput.SetControllerVibration ( 0, 0, OVRInput.Controller.RTouch); hapticsClip = new OVRHapticsClip(audioClip); OVRHaptics.LeftChannel.Mix(hapticsClip)
  23. Touchίϯτϩʔϥʔͷࢥ૝ !23 - Individual - OVRInput.Get(Button.PrimaryIndexTrigger, Controller.LTouch); - OVRInput.Get(Button.PrimaryIndexTrigger, Controller.RTouch);

    - ୈೋҾ਺Λ variableʹ͢Δ͜ͱ Ͱɺࠨӈͷ۠ผ͕ͳ͘ͳΔ
 → ϞϊࣗମʹτϦΨʔΛ࣋ͨͤΔ - OVRInputશൠ͕ଟ෼ͦ͏͍͏ࢥ૝ - Hapticsػೳ ͳͲ Individual
  24. ϞϊࣗମʹτϦΨʔΛ࣋ͨͤΔ ॐͷ࣮૷ !24 public class Gun : OVRGrabbable, IGrabbable {

    OVRInput.Controller currentController; public void GrabBegin(OVRInput.Controller controller) { currentController = controller; } void Update() { if (isGrabbed && OVRInput.GetDown(OVRInput.Button.PrimaryIndexTrigger, currentController)) { // implement } } }
  25. ϞϊࣗମʹτϦΨʔΛ࣋ͨͤΔ ॐͷ࣮૷ !25 public interface IGrabbable { void GrabBegin(OVRInput.Controller controller);

    } public class CustomOVRGrabbable : OVRGrabber { protected override void GrabBegin() { base.GrabBegin(); if (m_grabbedObj is IGrabbable) { ((IGrabbable)m_grabbedObj).GrabBegin(m_controller); } } }
  26. !26 VRͰ΍Γ͍ͨجຊతͳػೳ͕
 ͢΂ͯἧ͍ͬͯΔঢ়ଶ - खͰϞϊΛ௫Ή - ςϨϙʔτҠಈ - UIΛૢ࡞͢Δ(uGUI) σϝϦοτ:

    Ҡ২͸େมʹ
 1.31͔Β͸
 ΫϩεϓϥοτϑΥʔϜʹରԠ Oculus Integration͕௒ศརʂʂ OculusͷSampleFrameworkશγʔϯΛQuest࣮ػͰಈ͔ͯ͠Έͨ https://qiita.com/nkjzm/items/58a696f66c4989e5a35c
  27. !27 Oculus Integration੡ΞϓϦ͕
 (΄΅)ͦͷ··Vive ProͰಈ͍ͨʂ
 །ҰඞཁͳରԠ • Open VRͷΠϯϙʔτ •

    ίϯτϩʔϥʔରԠ ΫϩεϓϥοτϑΥʔϜʹରԠ
  28. !28 • Open VRͷΠϯϙʔτ • [Player Settings]-[XR Settings]-[Virtual Reality SDKs]Ͱʮ+ʯΛԡͯ͠OpenVRΛ௥Ճ

    • [Window]-[Package Manager]ΑΓ[OpenVR (Desktop)]ΛInstall (όʔδϣϯ͸1.0.5) • ίϯτϩʔϥʔରԠ ΫϩεϓϥοτϑΥʔϜʹରԠ
  29. !29 • Open VRͷΠϯϙʔτ • ίϯτϩʔϥʔରԠ • ֓Ͷ௚ײతͳରԠ෇͚ • Touch,

    AxisXDʹ΋ରԠ • ෺ཧతʹରԠ͍ͯ͠ͳ͍Ωʔ • A,X,Start,Back • ΫϩεϓϥοτϑΥʔϜରԠ͢Δ ͳΒࣄલͷ૝ఆΛ͓͢͢Ί ΫϩεϓϥοτϑΥʔϜʹରԠ Oculus IntegrationΛ༻͍ͨVive։ൃ࣌ͷίϯτϩʔϥʔରԠʹ͍ͭͯ - Qiita https://qiita.com/nkjzm/items/45112ef07f7d946e3521
  30. !30 Ҡ২ʹ͍ͭͯ Standalone VR Meetup #02 - connpass https://standalone-vr.connpass.com/event/132070/ Standalone

    VR MeetupͰฉ͍ͨײ͡ ૯ͯ͡؆୯ͦ͏…ʂ • OculusϓϥοτϑΥʔϜܥ • ౦ژΫϩϊε • EXOS_DEMO • SteamVR • ϦϦʔεࡁΈSteamVRήʔϜΛQuestʹҠ২ͨ͠࿩
 https://qiita.com/GONBEEE_project/items/ 590405a1f514559712c5
  31. !31 τΡʔϯௐͷ3DϞσϧ͕
 CC-BY3.0ͰखʹೖΔʂ - Poly Toolkit͕ศར
 https://developers.google.com/poly/ develop/toolkit-unity - Object2TerrainͰ


    ܰྔίϦδϣϯΛੜ੒ Google PolyͰ؆୯Ϩϕϧ੍࡞ʂ
  32. !32 Google PolyͰ؆୯Ϩϕϧ੍࡞ʂ ΦϒδΣΫτʹ߹ΘͤͯTerrainΛ࡞ΔʲUnityʳʲΤσΟλ֦ுʳ http://kan-kikuchi.hatenablog.com/entry/ObjectToTerrain - Poly Toolkit͕ศར - Object2TerrainͰ


    ܰྔίϦδϣϯΛੜ੒
  33. !33 ϩέʔγϣϯϕʔεVRϨϕϧͷମݧ͕ࣗ୐Ͱؾܰʹग़དྷΔ - 5ສԁͷσόΠεͰา͖ճΕΔͷ࠷ߴ͗͢Δ - ൣғ֎ʹߦ͚ͳ͍͜ͱ͕෼͔Δݟͨ໨ ͩͱҰؾʹ޿͕Γ͕૿͢ ϧʔϜεέʔϧ͕௒ָ͍͠ʂʂʂ

  34. !34 ൣғ֎ʹߦ͚ͳ͍͜ͱ͕෼͔Δݟͨ໨

  35. !35 ຊ೔ͷൃද಺༰ 01 VRλϫʔσΟϑΣϯε 02 OculusQuest։ൃͷجຊ 03 OculusQuestͷ։ൃTIPS 04 OculusQuest׬શཧղʹཧղͨ͠

  36. !36 OculusQuest׬શཧղʹཧղͨ͠ Ҿ༻ݩ: https://twitter.com/kaitendaentai/status/1052689241744896001

  37. !37 OculusQuest׬શཧղʹཧղͨ͠ Ҿ༻ݩ: https://twitter.com/kaitendaentai/status/1052689241744896001 ೳྗͷ௿͍ਓ෺͕
 ࣗΒͷ༰࢟΍ൃݴɾߦಈͳͲʹ͍ͭͯɺ
 ࣮ࡍΑΓ΋ߴ͍ධՁΛߦͬͯ͠·͏
 ༏ӽͷࡨ֮ΛੜΈग़͢ೝ஌όΠΞε Ҿ༻ݩ: μχϯάʹΫϧʔΨʔޮՌ

    - Wikipedia
  38. !38 OculusQuest׬શཧղʹཧղͨ͠ Ҿ༻ݩ: https://twitter.com/kaitendaentai/status/1052689241744896001

  39. !39 OculusQuest׬શཧղʹཧղͨ͠ Ҿ༻ݩ: https://twitter.com/kaitendaentai/status/1052689241744896001 ͜Ε͔Βٸܹʹࣗ৴Λࣦ͍ͬͯ͘༧ఆͳͷͰɺ Twitterͱ͔Qiitaͱ͔ϒϩάͱ͔Ͱ஌ݟڞ༗ͭͭ͠ɺ
 ΈΜͳͰ੝Γ্͍͖͛ͯ·͠ΐ͏

  40. !40 ͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠—

  41. !41

  42. !42