1
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.

Unityで画像からobj形式ファイル作成

Last updated at Posted at 2020-07-09

pngやjpegの画像をobjにしたいがさくっとする術が見つからん。。

Unityできたけど
ちょっと忘れそう、かつ、またはまりそうなので備忘録

手順

画像を反映したMaterialを用意

unityのProjectビューの任意の場所にお目当ての画像をドラッグ&ドロップ
image.png

projectビューの任意のフォルダで右クリックから新規マテリアル作成

右クリック > Create > Material
image.png

で、そのMaterialのInspectorビューからShaderを変更
Diffuseで検索したら出てくる「Mobile/Diffuse」にする

で下記画像の様になっているので↓
image.png
赤枠のところにお目当て画像をドラッグ&ドロップする

こんな感じで画像はいったの確認できる↓
image.png

ただこの状態だとなんか灰色がかった状態になってしまう。
そこで更にShaderを変更するとそれが回避出来る
UI > Defaultを選択する
image.png

これでMaterial完成

Materialを反映する3Dオブジェクト作る

HierarchyビューでPlaneオブジェクト作ってよしなにする。
とりあえず縦向けたかったり、サイズ適当に調整してこんな感じ
image.png

Materialを3Dオブジェクトに反映する

先ほど作ったMaterialを、これまた先ほど作ったPlaneオブジェクトにドラッグ&ドロップする反映される
image.png

したらいい感じの3Dオブジェクト出来上がり
image.png

UniVRMでglb形式でエクスポートする

UniVRMをインポートしてないひとは探してインポートしてください。

インポートしてれば画面上の方にVRMボタンがあるので
image.png

UniGLTF 1.28 > Export で適当に名前を付けてglb形式のファイルを無事出力。

これで完成よ。

1
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
1
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?