2021年6月10日木曜日

Object capture でうさぎを3Dにする! その5 〜Object capture でうさぎを3Dにしたよ〜

けっきょく M1 の Macbook Air を緊急調達しまして(中古でね; メモリ16GB は中古じゃないと即手に入らない)、実際に Object capture を試してみましたよ。


どんなのができた?

こんなのができました🐰



 

私は 3D も フォトグラメトリ も完全素人なのに、ここまでできるのはすごいですね!

下面がおかしいのは、これはもうしょうがないのかな。ぬいぐるみを一時的に浮かして撮ればなんとかなるのかもしれない。

 

どうやって作った?

写真

このとき、写真を36枚使いました。

 

実は、これより前に白い模造紙で囲った場所に ターンテーブルを置いて ぬいぐるみを回転させながら撮っていったのですが、これがいけなかった。
ぬいぐるみがほぼ単色だから悪いのか、形をなしていないものしかできあがりませんでした。

そこで撮影の配慮を何もせず、ただぬいぐるみを部屋において、周囲を回りながら撮影したものがさきほどの 3Dのモデル画像になります。

※ちなみに、正統な撮影方法はこちらにあります。

 

実行コマンド

HelloPhotogrammetry をコマンドとして実行できるまでの準備については割愛しまして、
HelloPhotogrammetry のコマンドについてです。

OVERVIEW: Reconstructs 3D USDZ model from a folder of images.

USAGE: hello-photogrammetry <input-folder> <output-filename> [--detail <detail>] [--sample-overlap <sample-overlap>] [--sample-ordering <sample-ordering>] [--feature-sensitivity <feature-sensitivity>]

ARGUMENTS:
  <input-folder>          The local input file folder of images.
  <output-filename>       Full path to the USDZ output file.

OPTIONS:
  -d, --detail <detail>   detail {preview, reduced, medium, full, raw}  Detail
                          of output model in terms of mesh size and texture
                          size . (default: nil)
  -l, --sample-overlap <sample-overlap>
                          sampleOverlap {normal, low}  It should be set to
                          `low` if there is low overlap between images captured
                          nearby in space.
  -o, --sample-ordering <sample-ordering>
                          sampleOrdering {unordered, sequential}  Setting to
                          sequential may speed up computation if images are
                          captured in a spatially sequential pattern.
  -f, --feature-sensitivity <feature-sensitivity>
                          featureSensitivity {normal, high}  Set to high if the
                          scanned object does not contain a lot of discernible
                          structures, edges or textures.
  -h, --help              Show help information.


今回、私はこのように実行しました。

 ./HelloPhotogrammetry ~/Desktop/rabbit6 rabbit6_full_normal_seq_normal.usdz -d full -l normal -o sequential -f normal

  • 第1引数
    • 写真が入ったディレクトリのパス
  • 第2引数
    •  生成されるファイル名(拡張子としてかならず .usdz をつけましょう)
  • -d 引数
    • すばやく確認したいときは preview
      そうでないときは full
      だと良さそうです
    • ただし full でも1-数分待てばできあがるので、full 固定でもよいのかも
  • -l 引数
    • 対象の写真をあまり撮影していない場合は low を
      そうでなければ normal のようです
    • この値は検証しがいがありそうな感じです
  •   -o 引数
    • 撮影した写真が比較的順番に並んでいるかをあらわし、順番に撮影したなら sequential
      そうでなければ unordered です
    • ただし処理速度に影響するだけらしいので、撮影した写真のファイル名と順番に一貫性がないなど自身がなければ unordered でよいでしょう
  • -f 引数
    • 対象物の背景等がはっきりしていなければ high にするようです
      背景等がはっきりしていれば normal
    • この値も検証しがいがありそうな感じです


このあたりの引数を変えながら出力される3D結果を見たんですが、まだまだ掴みきれていません。

3D にしたいものを手軽に 3D にするために、今後も検証してゆこうと思っています。


 

< 分身さんこんにちわー🐰



 

 

 

 

0 件のコメント:

コメントを投稿