Using Terrain Stamps in the Unity Inspector
The Unity Inspector is used for accessing and adjusting exposed variables and settings for selected assets and objects in Unity. The Terrain Inspector in Unity is shown in the example screenshot.
To access the Terrain Inspector select a terrain following either of these two methods.
- Left-click a desired terrain through the Hierarchy Window (not shown here). A terrain is selected in the Hierarchy window when the terrain identifier in the Hierarchy list is highlighted in blue.
- Left-click or use the Select tool on a desired terrain through the Scene Window. A terrain is selected in the Scene Window when the outer edges of the terrain plane is highlighted with an orange outline.
Under the second subheading titled Terrain, select the Paint Terrain tab. This tab displays a symbol of mountains with a paintbrush. When selected it is signified in blue and will reveal the Brushes Selection Window. For the example screenshot both are also outlined in red.
Select Stamp Terrain from the dropdown below the tabs to use provided brushes as stamps. Stamps are technically brushes according to Unity. The dichotomy between "brush(es)" and "stamp(s)" in these instructions refer to the intended use of brushes in Unity. Stamps are used for creating specific landforms, while Brushes are used for painting and forming dynamic terrain features.
Provided brushes in the asset package use R-16 heightmaps for their Mask Texture. These heightmaps are designed in Adobe Substance Designer with the intention of Stamp Terrain use in Unity. Despite this intention the terrain stamps can be used as terrain brushes through other terrain design methods in the dropdown, which is described below.
Potential Troubleshooting:
The Brushes Subwindow contains a dozen built-in Unity brushes, the first 12 brushes in the example above. If only these default Unity brushes are displayed after importing your asset package provided by DarkMatterMagic, please try reimporting the asset from the Package Manager window under and within My Assets.
Setting Stamp Results in the Unity Inspector
Stamp Height: This slider is for controlling the height of the landform result produced when clicking the stamp onto a terrain.
Subtract: When checked, this Boolean toggle, allows stamps to imprint depth into designed landforms and flat terrain. An excellent setting for creating a range of realistic and fictional environment details for monumental impressions. This setting is essential and useful for stamping height downwards and subtracting into already existing landforms for dynamic landform design.
Max <--> Add: This setting is a floating point (decimal) from 0.0 -> 1.0. It determines the amount of addition a stamp has on already stamped terrain. This slider controls the strength and intensity of the overlapping and blending of stamps to create dynamic and complex landforms in combination.
Brushes: In this window you can select a brush which will be displayed in the frame on the left. In the selection window you can also delete or create new brushes. This window will also contain any custom brushes you import. Specifically it will contain the custom stamp brushes provided with your asset package provided by DarkMatterMagic.
Brush Size: A slider that controls the stamp size on the terrain.
Opacity: A slider that controls the strength/intensity of your stamp brushes. From 0 to 100, opacity within stamp use translates to the percentage of the Stamp Height. In the example on the left, if the Opacity were 100, the stamp would produce a dramatic landform with a max height of 400. With an Opacity of 40, the stamp result is less dramatic, being a max height range of 160.
Stamp Opacity Redundancy:
The Opacity slider, despite being present and functional, is somewhat redundant for stamping terrain, as you can simply set the height. It is essential and useful when using brushes to sculpt terrain. The terrain modeling brush uses do not have a height setting, except for the Set Height brush use, therefore opacity in a sense controls your sculpting intensity overtime.
Stamp Height Exceeding Terrain Height:
If the Stamp Height exceeds the set height of the selected terrain, the stamp will flatten at the set height of the terrain. This will result in lost details and void the functionality of the stamp. If the flattop mesa look is desired consider setting the brush use from the dropdown to Set Height.
To change the height of your current terrain, click the last icon tab to access your terrain settings. This tab displays mountains with a cog wheel. Within this icon tab under the subheading Mesh Resolution (On Terrain Data) the Terrain Height setting can be adjusted as desired to achieve your vision and intentions.
Please note that adjusting the terrain height setting will translate to already formed terrain. The current forms on a terrain will adjust proportionally in relational ratio from its previous setting to the new setting.
EXAMPLE: A Terrain Height of 600 with a landform stamped with a Stamp Height of 300, will become a landform with a max height of 900 if the Terrain Height setting were increased to 1800.
Using Stamps as Brushes in the Unity Inspector
When switching from Stamp Terrain to Raise or Lower Terrain, as seen in the screenshot on the left, there is no Stamp Height, Subtract, or Max <--> Add. Provided stamps can be used as brushes for sculpting and modeling terrain. Though this is possible, provided stamps are designed for stamp use and untested for use as brushes.
It is important to understand the use type words such as Stamp and Brush. All Stamps are technically brushes, but not all brushes are designed for stamp use. Therefore within the context of this manual the word Stamp is used to address and describe brushes designed for Stamp Terrain use in Unity. Raise or Lower Terrain and Smooth Height are considered brush use within this manual.
Installing Terrain Tools expands the functionality of brush use within the Terrain Inspector. The package can be found and installed following the this path:
Menu Bar > Window > Package Manager > Package:... (dropdown) > select Package: Unity Registry
Either scroll down to find Terrain Tools or search Terrain Tools within the Package Manager window. Upon selecting it, click the Install button in the top-right corner of the window.
Despite this added and expanded functionality, this instructional manual describes the use of assets from the default terrain functionality of 2022.3.36f1 URP. Provided stamps are not restricted to this version or render pipeline, though the asset package contains assets outside of stamps that do require this version and render pipeline.
Customizing Stamps/Brushes in the Unity Inspector
Referencing the example on the left, take notice of the dropdown window showing the settings of the brush. To open and close the dropdown window, click the small arrow in the bottom left corner of the brush section.
Mask Texture: A 2D texture selector for connecting an input texture for the brush.
Falloff Curve: A curve graph for controlling the range of 0.0 to 1.0. 0.0 is black and 1.0 is white. The curve can be shaped and placed on a graph to control the ranges of its output and location of those ranges. It is easier to understand with experimentation! Click the line and a graph window will open with the curve.
Falloff Radius Scale: This slider controls an overall falloff of the brush in relation to a center. Simply it will darken the edges of the Mask Texture output, with the intensity increasing with a lower scale. This is a subtle setting and is best used to finalize customizing or for a subtle edge softening. At the current setting in the example there is no falloff and the brush is unadulterated form of the connected Mask Texture.
Brush Remap: This range slider is similar to the Falloff Curve but simpler. Instead of the dynamics of a curve customization, the values of 0.0 (black) the left handle and 1.0 (white) the right handle are on a dual point slider. Both ends of the slider can be adjusted to increase the white and black value intensity of the Mask Texture output to customize the shape and results of the brush/stamp.
Brush Invert: This Boolean toggle will invert 0.0 (black) to 1.0 (white) and 1.0 to 0.0. Example: 0.2 to 0.8 and 0.8 to 0.2.
Considering Brush Use (Raise or Lower Terrain):
If you wish to use the provided stamps as brushes, you will likely need to soften the edges of the heightmaps by adjusting the setting of the brush. When designing these texture a smooth falloff was used to produce the slopping heights the stamping produces.
If you plan to use these stamps as brushes for sculpting terrain in Unity, try lowering the Falloff Radius Scale first. This slider can further soften the brushes edges to produce a potentially more desirable effect.
But if you would like to have further control over this falloff, the Falloff Radius Scale is a simple and easier slider to get started with customizing your brushing and stamping to desired effect.