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

アバターミーティングを支える技術

 アバターミーティングを支える技術

ねおりん

January 13, 2021
Tweet

More Decks by ねおりん

Other Decks in Technology

Transcript

  1. 6

  2. 13

  3. Ϋϥογϡ͢Δ • ͠͹Β͘ಈ͔ͯ͠Δͱ EXC_BAD_ACCESS ͰམͪΔ • ARFoundation 3.x ͳΒ໰୊ͳ͍ •

    ͜Ε͕͋ͬͯ ARFoundation 4.x ʹ্͛ΒΕͣɺ Unity2020.2 ʹ ΋্͛ΒΕͳ͍ " • Issue Ͱ͸iOS14ͷ໰୊ͱݴΘΕ͍ͯΔ(मਖ਼Λ଴͔ͭ͠ͳͦ͞͏) > github.com/Unity-Technologies/arfoundation-samples/issues/ 707 17
  4. Face Tracking ͷσʔλ͸ڸ • ARKit ͷ Face Tracking ͰऔಘͰ͖Δσʔλ͸ࠨӈ൓సͯ͠ೖͬͯ ͘Δ

    • ΧϝϥͷલͰӈΛ޲͘ͱࠨճసΛɺӈ໨Λด͡Δͱࠨ໨Λด ͡ΔΑ͏ͳσʔλΛฦ͢ 18
  5. ද৘ͷϚοϐϯά • ARKitͰऔಘͰ͖Δ Blend Shape Ωʔ͸(ଟ͘ͷ)Ξόλʔͷ࣋ͭͦ Εͱ͸ҟͳΔ • ಉ͡ Blend

    Shape ΛΞόλʔʹ༻ҙͯ͠ɺͦͷ··ύϥϝʔ λʔΛ൓өͤ͞ΔʮύʔϑΣΫτγϯΫʯͱݺ͹ΕΔ֓೦΋ ͋Δ 23
  6. Leap Motion • ϋϯυδΣενϟʔίϯτϩʔϥʔ • 2012೥ͷσόΠε • ڈ೥(2020೥9݄) IR 170

    ͱ͍͏݁ߏੑೳ্͕͕ͬͨධՁΩοτ͕ ൃച͞ΕͯΞπ͍ • Unity ϓϥάΠϯ͕ఏڙ͞Ε͍ͯΔ 25
  7. Leap Motion • جຊతʹ͸ LeapServiceProvider or LeapXRServiceProvider ίϯϙʔωϯτΛ࢖͑͹࣮૷͸؆୯ • LeapServiceProvider

    ͸صஔ͖ • LeapXRServiceProvider ͸टͱ͔಄ʹϚ΢ϯτ͢Δ༻ • ࣗ෼Ͱ࣮૷͢Δ(pure class ʹ͍ͨ͠ͱ͔ɺصஔ͖ͱटϚ΢ϯτ Λ੾Γସ͑ΒΕΔΑ͏ʹ͍ͨ͠)৔߹͸ɺ PolicyFlag Λ੾Γସ͑ Δͷͱɺ࠷దͳ Interpolate ͷΦϓγϣϯ͕ҧ͏ͬΆ͍఺ʹ஫ҙ 26
  8. Custom UTI • iOS ͷڞ༗ϘλϯΛԡͨ͠ͱ͖ʹग़ͯ ͘ΔϦετʹ Unity ੡ΞϓϦΛฒ΂Δ • ͜ΕͰVRMϑΝΠϧΛ։͚Δͱ஍ຯʹ

    ศར • (׬શʹࣗ෼༻ͩͬͨΒΞϓϦʹຒΊ ࠐΜͰ΋ྑ͍͕ɺͲ͏ͤΞόλʔ͸Α ͘मਖ਼͢ΔͷͰϥϯλΠϜϩʔυʹର Ԡ͓ͯ͘͠ͱָ) 29
  9. Info.plist Λ͕Μ͹ͬͯॻ͘ [PostProcessBuild] public static void OnPostProcessBuild(BuildTarget target, string path)

    { if (target != BuildTarget.iOS) return; var plistPath = path + "/Info.plist"; var plist = new PlistDocument(); plist.ReadFromString(File.ReadAllText(plistPath)); var rootDict = plist.root; var exportedTypeDeclarations = rootDict.CreateArray("UTExportedTypeDeclarations"); var exportedTypeDeclarationsDict = exportedTypeDeclarations.AddDict(); var typeConformsTo = exportedTypeDeclarationsDict.CreateArray("UTTypeConformsTo"); typeConformsTo.AddString("public.data"); exportedTypeDeclarationsDict.SetString("UTTypeDescription", "VRM"); exportedTypeDeclarationsDict.CreateArray("UTTypeIconFiles"); var typeIdentifier = $"{PlayerSettings.applicationIdentifier}.custom"; exportedTypeDeclarationsDict.SetString("UTTypeIdentifier", typeIdentifier); var typeTagSpecification = exportedTypeDeclarationsDict.CreateDict("UTTypeTagSpecification"); var typeTagSpecificationArray = typeTagSpecification.CreateArray("public.filename-extension"); typeTagSpecificationArray.AddString("vrm"); var documentTypes = rootDict.CreateArray("CFBundleDocumentTypes"); var documentTypesDict = documentTypes.AddDict(); documentTypesDict.SetString("CFBundleTypeName", "VRM"); documentTypesDict.SetString("CFBundleTypeRole", "Viewer"); documentTypesDict.SetString("LSHandlerRank", "Alternate"); var itemContentTypes = documentTypesDict.CreateArray("LSItemContentTypes"); itemContentTypes.AddString(typeIdentifier); File.WriteAllText(plistPath, plist.WriteToString()); } https:/ /gist.github.com/noir-neo/ 91e7a09e87e15280c1b2c70648b833f1 30
  10. ͋ͱ͸URLͷϋϯυϦϯάͱಉ͡ @interface UrlHandlerAppController : UnityAppController @end @implementation UrlHandlerAppController - (BOOL)application:(UIApplication

    *)application openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey, id> *)options { // TODO: Handling return YES; } @end ͨͩ͜͜͠Ͱड͚औͬͨURI͸࣍ճىಈ࣌ʹ͸࢖͑ͳ͍ͷͰΞό λʔΛΩϟογϡ͓ͯ͘͠࢓૊ΈͳͲ͕ผ్ඞཁ 31
  11. Animation Rigging • TwoBoneIK ͕ඪ४Ͱೖ͍ͬͯΔͷͰ࿹ͷ IK ʹ΋࢖͑Δ(݁ߏ͍͍ ײ͡) • (಄ͱख͔Β਎ମશମΛΑ͠ͳʹIK͢ΔɺΈ͍ͨͳͷ͸

    FinalIK ͱ͔࢖͏ํָ͕) • มͳճసΛೖΕͯ΋ muscle ͷൣғͰಈ͔ͯ͘͠ΕΔͷͰ࠷ѱͷ ഁ୼ͷ࢓ํ͸͠ͳ͍ 33
  12. ࣗ෼ͰݟΔө૾͸ڸʹ͢Δ • Unity Ͱ Camera ͷө૾ΛϑϦοϓ͢Δʹ͸ projectionMatrix Λ͍ ͡ΔΒ͍͠ •

    culling ͱ͔ΊΜͲͦ͘͞͏ • Render Texture ʹඳ͍ͨ΋ͷΛ Canvas ͷ UV Ͱ൓సͤ͞Δͷ͕ ָ • ͍ͭͰʹɺૹग़͢Δө૾ʹ͸ UI ΛೖΕͨ͘ͳ͍ͱ͔΋͋Δͷ Ͱແବ͸ͳ͍ 35
  13. Spout / Syphon / NDI • ө૾(ͷϑϨʔϜ)Λڞ༗͢Δϓϩτίϧ • Spout(Windows) /

    Syphon(mac) ͸Ϛγϯ಺ • NDI ͸ϩʔΧϧωοτϫʔΫ಺ • Unity Ͱ͸ Klak{Spout|Syphon|NDI} Λ࢖͏ • keijiroਆ ! 36
  14. 39