SpeedTree は IDV 社によるサードパーティ製の製品で、既成の樹木のアセットと、樹木に特化したモデリングソフトウェアを提供します。
Unity は 他のアセットを処理するのと同じ方法で、SpeedTree の Model アセット を認識しインポートします。SpeedTree Modeler 7 を使用している場合は、Unity バージョンのモデラーを使用して .spm
ファイルを再保存してください。 SpeedTree Modeler 8 を使用している場合は、.st
ファイルを直接 Unity の Project フォルダーに保存します。
Project フォルダー内でテクスチャをアクセス可能にしておくと、Unity は各 Level of Detail (LOD) ごとに自動的にマテリアルを生成します。アセットを選択すると、生成されたゲームオブジェクトとアタッチされたマテリアルを調節する インポート設定 があります。Generate Materials または Apply & Generate Materials ボタンをクリックしない限り、アセットを再インポートしても、マテリアルを再生成しません。したがって、マテリアルのカスタマイズをすべて保持することが可能です。
SpeedTree インポーターは LODGroup コンポーネントが設定されたプレハブを生成します。プレハブをシーン内でインスタンス化するには、一般的なプレハブインスタンスとして使用するか、または、プレハブを樹木のプロトタイプとして選択し Terrain 全体にペイントします。
さらに、Terrain は LODGroup コンポーネントを持つゲームオブジェクトをすべて樹木のプロトタイプとして受け取り、メッシュサイズや使用するマテリアルの数に制限を設けません。これは Tree エディター による樹木とは異なります。ただし、SpeedTree による樹木は通常、3〜4 種類の異なるマテリアルを使用するため、フレームごとに多くのドローコールを発します。したがって、レンダリングパフォーマンスに対して追加のドローコールが比較的高負担になるモバイルなどのプラットフォームで、LOD の樹木を頻繁に使用することは推奨されません。
SpeedTree モデルインポーターには、SpeedTree マテリアルアセットを処理するワークフローを向上させる Materials タブがあります。詳細は、SpeedTree モデルインポーターの Material タブ のページを参照してください。
ビルボードの影を正しく投影するために、Unity は、ShadowCaster パスの間はビルボードを回転させ、ビルボードをカメラでなくライト方向 (ポイントライトの場合はライトの位置) を向かせます。
これらのオプションを有効にするには、SpeedTree アセットの Inspector ウィンドウで ビルボード の LOD レベルを選択し、Billboard Options で Cast Shadows か Receive Shadows にチェックを入れ、Apply Prefab をクリックします。
インスタンス化された SpeedTree ゲームオブジェクトのビルボードのシャドウオプションを変更するには、Hierarchy ウィンドウでビルボードゲームオブジェクトを選択し、Billboard Renderer の Inspector でこれらのオプションを調節します。
Terrain 上でペイントしたツリーは、プレハブからビルボードのシャドウオプションを継承します。実行時にこれらのオプションを変更するには、BillboardRenderer.shadowCastingMode
と BillboardRenderer.receiveShadows
を使用します。
既知の問題 他のレンダラーと同様に、Receive Shadows オプションはディファードレンダリングを使用している間は効果がありません。ビルボードは常にディファードパスで影を受けます。
2019–01–29 修正されたページ
SpeedTree 8と関連リンクに関する情報を追加
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.