しめ鯖日記

swift, iPhoneアプリ開発, ruby on rails等のTipsや入門記事書いてます

Unityでフィールドに木を生やす

まずはHierarchyビューからTreeを作成します。

f:id:llcc:20160323223017p:plain

Treeを選択するとInspectorはこのようになっています。
ここの下の方にある木のようなボタンを押下します。

f:id:llcc:20160323223153p:plain

そうすると木に枝が付きます。

f:id:llcc:20160323223254p:plain

その枝を選択した状態でFrequencyの数字を30にしてみます。

f:id:llcc:20160323223331p:plain

枝の数が30本になりました。

f:id:llcc:20160323223418p:plain

次に枝ボタンのとなりにある葉っぱボタンを押します。

f:id:llcc:20160323223450p:plain

このように葉っぱが付きました。

f:id:llcc:20160323223517p:plain

葉っぱのFrequencyも10くらいに設定します。

f:id:llcc:20160323224409p:plain

次は木の表面を加工します。
Asset StoreでTree Creator Tutorial AssetsというAssetをインストールします。

f:id:llcc:20160323223628p:plain

TreeのInspectorのMesh Rendererに適当なMaterialを紐付けます。

f:id:llcc:20160323224442p:plain

これで木が完成です。

f:id:llcc:20160323224605p:plain