3
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

AR Foundation 3D Object Tracking を試した 2021.9

Posted at

概要

こちらの記事を見て、現在も同じ感じなのか試してみました。

【ARKit】3Dオブジェクトをマーカーにする - おもちゃラボ
https://nn-hokuson.hatenablog.com/entry/2019/06/25/192111

環境

mac
Unity 2020.3.15f2
ARfoundation 4.1
iPhoneXS

事前調査

AR Foundation 4.1.7 では android は 3D Object tracking に対応していない模様。

2021-09-05_11h36_03.png

モデルを用意

リアルモデルとARモデルを同じにしたかったので、以下からペーパークラフトデータとモデルデータをいただきました。ありがとうございます。

BlenderでSalesforce アストロくんのペーパークラフトを作る - Qiita
https://qiita.com/atskimura/items/056b4d904dd140589cf3

コンビニで印刷して組み立て

ファミリーマートでA4光沢紙に印刷。

完成

IMG_0034.jpg

特徴点測定

スキャン用のプロジェクトをダウンロード、ビルドしてiPhoneにインストール。

Scanning and Detecting 3D Objects | Apple Developer Documentation
https://developer.apple.com/documentation/arkit/content_anchors/scanning_and_detecting_3d_objects

起動してぐるっと測定

生成された.arobjectファイルをmacに持っていく。

ARFoundationSampleを改造

  • ARFoundationのObjectTrackingを開く
  • ReferenceObjectLibraryに.arobjectを登録

mac_ss_2021-09-05 20.20.53.png

mac_ss_2021-09-05 20.21.00.png

  • AR表示する3Dオブジェクトは初期参照されている Large TriAxis を複製してそれにぶらさげたLarge TriAxis Astro として作りprefab化しました。

mac_ss_2021-09-05 20.21.15.png

  • 作成したprefabを設定。

mac_ss_2021-09-05 20.21.28.png

  • ビルド。iPhoneにインストール

結果

無事認識しモデルが表示されました。MarkerBasedよりは固定される印象。

これはどうやってるんだろう

元記事にあった動画はどうやって実現してるのかわからずじまい。同じことやりたい。

3
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?