xR Tech Tokyo #18 @ ソフトバンクDrama(@1901drama)SwiftでARKit3 を 使うには
View Slide
機能 対象Coaching UI ・環境データ取得用のアニメーションを表示させる A9 以上(iPhone 6s/SE)People Occlusion 2D/3D ・ユーザーの身体を、 3Dオブジェクトの手前に表示させる・ユーザーの身体と 3Dオブジェクトの前後関係を、反映し表示させるA12 Bionic以上(iPhone xR/xS)Motion Capture 2D/3D ・ユーザーの身体 /関節の位置を画面上の位置座標で取得出来る・ユーザーの身体 /関節の位置を空間座標で取得出来るA12 Bionic以上(iPhone xR/xS)Multiple Face Tracking ・3人までの顔の場所と表情を同時追跡する A12 Bionic以上(iPhone xR/xS)SimultaneousFront and Back Camera・手前側のカメラと背面側のカメラで同時に ARを利用出来る A12 Bionic以上(iPhone xR/xS)Collaborative Sessions ・他のユーザーとの AR体験の共有を補助する A9 以上(iPhone 6s/SE)ARKit3で追加されたメイン機能
Coaching UI People Occlusion 2D/3D Motion Capture 2D/3D
Multiple Face TrackingSimultaneousFront and Back Camera Collaborative Sessions
Swiftで開発するときのメリット・デメリット● iOS固有の機能を複合して組み込み出来る(UIKit, Depth等のセンサー, 認証系...)● Buildが早い● Appleのドキュメントを直接解釈出来る● iOS全般の知識が必要● 3Dの理解が難しい● Androidへの移行が困難(開発工数がかかる)● エンジニアが少ない(転職や情報共有が難しい) 今日はこちらの人向け
ARConfiguration
ARWorldTrackingConfigurationARBodyTrackingConfigurationARImageTrackingConfigurationAROrientationTrackingConfigurationARPositionalTrackingConfigurationARObjectScanningConfigurationARFaceTrackingConfiguration● Plane Detect● Human Detect● Motion Capture● Face Detect● Image Detect● Image Tracking● Face tracking● Position Tracking● Object Detect● Object ScanARKit3で検知するモードと対象● Orientation Tracking● WorldMap Export/Import● Collaborative Session● Simultaneous Front and Back Camera● People Occlusion
Depth
Depth取得条件に制限がある②Simultaneous Front and Back Camera+①RearCameraのDepthで自分を3D化=③depthデータを相手に送れば 3Dでコミュニケーションが 出来るのでは?
Depth取得条件に制限があるSimultaneous Front and Back Cameraでも、depthは取得出来ない。(FaceTrackingだけの場合は、従来通り取得出来る)Appleさんに改善依頼しました!
その他
● Coaching UIは普通のUIView扱いなので、そのままでは表示がズレます。● People Occlusion 3DとPlane Objectを併用するとまれにバグります。● Collaborative Sessionsは、同時5台くらいが限界かもしれません。● RealityKitの出来ることに制限があり、 SceneKitから移行出来ないなど...その他
ARKit 3.0のサンプルコード集『ARKit-Invader』ソースコード(GitHub/Qiita)サンプルコードあります!
ご清聴ありがとう御座いました。xR Tech Tokyo #18 @ ソフトバンクDrama(@1901drama)