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

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

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

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

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. !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)
  4. !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/
  5. !11 1. Unity্Ͱ։ൃ 2. AndroidΞϓϦ(*.apk)ͱͯ͠Ϗϧυ 3. QuestΛ༗ઢ઀ଓ(type-c) 4. adbίϚϯυͰΠϯετʔϧ
 


    5. Quest্Ͱىಈ
 ϥΠϒϥϦ>ෆ໌ͳΞϓϦΑΓ ։ൃ͔Β࣮ػىಈ·ͰͷྲྀΕ $ adb install -r hoge.apk
  6. !13 VRͰͷݟ͑ํ΍ಈ࡞Λ֬ೝ͢ΔͨͼʹϏϧυ͢Δͷ͕໘౗͍͘͞
 ↓↓↓ Rift / Vive / ALVRͰϓϨϏϡʔ͕Մೳʂ - OculusͷSDK͸શOculus੡඼ڞ௨ͳͷͰɺQuestͷػೳ͸RiftͰ΋ಈ͘

    - ΫϩεϓϥοτϑΥʔϜରԠͳͷͰVive΍WinMRͰ΋ಈ͘(ޙड़) - ALVRͰετϦʔϛϯάϓϨϏϡʔͱ͍͏ख΋ έʔεελσΟᶄ ։ൃதʹVRϓϨϏϡʔ͍ͨ͠ʂ
  7. !17 VRͰ΍Γ͍ͨجຊతͳػೳ͕
 ͢΂ͯἧ͍ͬͯΔঢ়ଶ - खͰϞϊΛ௫Ή - ςϨϙʔτҠಈ - UIΛૢ࡞͢Δ(uGUI) σϝϦοτ:

    Ҡ২͸େมʹ
 1.31͔Β͸
 ΫϩεϓϥοτϑΥʔϜʹରԠ Oculus Integration͕௒ศརʂʂ OculusͷSampleFrameworkશγʔϯΛQuest࣮ػͰಈ͔ͯ͠Έͨ https://qiita.com/nkjzm/items/58a696f66c4989e5a35c
  8. !19 - OVR Grabbable (ӈਤ͸ܧঝͨ͠Ϋϥε) - Snapػೳ: ௫Ή৔ॴΛఆٛՄೳ - Snap

    Offsetʹ஫ҙ - GameObjectͷWorld࠲ඪܥ Ͱͷݪ఺ͱͷڑ཭ = Offset - ͔ͭͬ͑ɾɾɾ - nullͩͱݪ఺ѻ͍ʹͳΔͷͰ ϓϨϋϒࣗମͰҐஔ߹Θͤ खͰϞϊΛ௫Ή
  9. !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ίϯτϩʔϥʔͷࢥ૝
  10. Touchίϯτϩʔϥʔͷࢥ૝ !21 - Individual - OVRInput.Get(Button.PrimaryIndexTrigger, Controller.LTouch); - OVRInput.Get(Button.PrimaryIndexTrigger, Controller.RTouch);

    - ୈೋҾ਺Λ variableʹ͢Δ͜ͱ Ͱɺࠨӈͷ۠ผ͕ͳ͘ͳΔ
 → ϞϊࣗମʹτϦΨʔΛ࣋ͨͤΔ - OVRInputશൠ͕ଟ෼ͦ͏͍͏ࢥ૝ - Hapticsػೳ ͳͲ Individual
  11. 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)
  12. Touchίϯτϩʔϥʔͷࢥ૝ !23 - Individual - OVRInput.Get(Button.PrimaryIndexTrigger, Controller.LTouch); - OVRInput.Get(Button.PrimaryIndexTrigger, Controller.RTouch);

    - ୈೋҾ਺Λ variableʹ͢Δ͜ͱ Ͱɺࠨӈͷ۠ผ͕ͳ͘ͳΔ
 → ϞϊࣗମʹτϦΨʔΛ࣋ͨͤΔ - OVRInputશൠ͕ଟ෼ͦ͏͍͏ࢥ૝ - Hapticsػೳ ͳͲ Individual
  13. ϞϊࣗମʹτϦΨʔΛ࣋ͨͤΔ ॐͷ࣮૷ !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 } } }
  14. ϞϊࣗମʹτϦΨʔΛ࣋ͨͤΔ ॐͷ࣮૷ !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); } } }
  15. !26 VRͰ΍Γ͍ͨجຊతͳػೳ͕
 ͢΂ͯἧ͍ͬͯΔঢ়ଶ - खͰϞϊΛ௫Ή - ςϨϙʔτҠಈ - UIΛૢ࡞͢Δ(uGUI) σϝϦοτ:

    Ҡ২͸େมʹ
 1.31͔Β͸
 ΫϩεϓϥοτϑΥʔϜʹରԠ Oculus Integration͕௒ศརʂʂ OculusͷSampleFrameworkશγʔϯΛQuest࣮ػͰಈ͔ͯ͠Έͨ https://qiita.com/nkjzm/items/58a696f66c4989e5a35c
  16. !28 • Open VRͷΠϯϙʔτ • [Player Settings]-[XR Settings]-[Virtual Reality SDKs]Ͱʮ+ʯΛԡͯ͠OpenVRΛ௥Ճ

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

    AxisXDʹ΋ରԠ • ෺ཧతʹରԠ͍ͯ͠ͳ͍Ωʔ • A,X,Start,Back • ΫϩεϓϥοτϑΥʔϜରԠ͢Δ ͳΒࣄલͷ૝ఆΛ͓͢͢Ί ΫϩεϓϥοτϑΥʔϜʹରԠ Oculus IntegrationΛ༻͍ͨVive։ൃ࣌ͷίϯτϩʔϥʔରԠʹ͍ͭͯ - Qiita https://qiita.com/nkjzm/items/45112ef07f7d946e3521
  18. !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
  19. !41

  20. !42