Brush (ブラシ) は、Terrain に Paint Texture や Smooth Height などのツールを利用するときに使われます。ブラシは、Terrain システムの ScriptableObject です。ブラシは、ツールの効果の形状と強さを定義します。
Unity には、一揃いのビルトインのブラシが備わっています。それらは、デザインを素早く描画するためのシンプルな円から、ディテールや自然な様相を作成するのに適したランダムに散布した形状に至るまでさまざまです。
You can also select Brush Masks from the Terrain overlays. To see available Brush Masks from the Terrain overlays, select a Terrain tool that you can use to paint.
ニーズに合わせて、独自の形状や特定のパラメーターを持つカスタムのブラシを作成することができます。例えば、特定の地質学的特徴を持つハイトマップテクスチャを使用してブラシを定義し、次に、Stamp Terrain ツールを使用してその形状を Terrain に配置します。
新しいブラシを作成するには、Terrain Inspector ウインドウの New Brush ボタンをクリックします。
New Brush をクリックすると Select Texture2D ウィンドウが表示されます。テクスチャを選択して新しいブラシの形状を定義し、Brush Inspector を使って Falloff と RadiusScale の値を調整します。
または、Project ウィンドウで右クリックし、Create > Brush を選択して新しいブラシを作成します。デフォルトのブラシは、白い Mask Texture、Falloff** カーブ、Radius Scale 1 で定義された簡単な円を表示します。または、テクスチャを設定してブラシの形状を定義します。Remap スライダーと InvertRemap Range オプションを使用して、** Brush__ テクスチャのグレースケール値をさらに変更することもできます。
プロパティ | 機能 |
---|---|
Mask Texture | ブラシの形状と強さを定義します。プロジェクトでテクスチャを選択すると、テクスチャからグレースケールのマスクが作成されます。選択したテクスチャに複数のカラーチャンネルがある場合、ブラシは Red チャンネルをソースとして使用します。 |
Remap | Falloff カーブの適用後に、ブラシマスクのグレースケール値を再マップします。エディターでは、スライダーの左側を使用して選択した値にブラシマスクの黒の値を再マップし、スライダーの右側を使用して選択した値にブラシマスクの白の値を再マップします。 |
Invert Remap Range | Remap スライダーの左側と右側を反転します。基本的にはマスク全体の値を反転します。 |
Falloff | ブラシの強さに循環的に影響するカーブを定義します。Falloff カーブをクリックして Unityの カーブエディター を開きます。カーブを編集して、滑らかにフェードするものから鋭いエッジまで、さまざまな効果を作成することができます。 |
Radius Scale | Falloff カーブのスケールに影響します。これを使って、カーブの半径を増減します。 |
2019–10–22 修正されたページ
新しい UI と一致するスクリーンショットに更新し、Brush Inspector の新しいオプションの情報を追加
Brush
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.