Other Useful Tools
Mesh Stamping
The mesh stamping tool lets you stamp any arbitrary mesh onto the terrain with a different degree of resolution.
To mesh stamping, follow these steps:
- Place an object that contains a Mesh on the terrain.
- Right click on the object and then select Terrain->Paint Selection.
The Paint Selection Settings window opens to show the different stamping options you can choose from:
Stamping options | |
---|---|
|
Examples
Example | Image |
---|---|
Smoothing Radius value of 10 You can see that the bottom is smoothed with the terrain |
Terrain splitting tools
Add Rules Components
We made a small utility to use a rule-based paint tool to add all the components you need to paint.
To access it, follow these steps:
- Right click on a Terrain.
- Select Add Rules Components
The tool automatically adds the correct components to enable rule-based painting.
Components | Descriptions |
---|---|
|
Remove terrain outside bounding box
The Remove Terrain Outside Bounding Box tool deletes any terrains that are not contained within the bounding box of the objects you select.
- Select the terain(s) you want to test and then right click.
- In the menu that appears, select Remove terrain outside bounding box.
A new dialog shows the terrains you selected and an empty list of exclusion boxes. - Use your mouse to select any objects and drag-and-drop them in the exclusion boxes section of the dialog. The system uses the objects you selected to calculate the combined bounding box.
- Select Apply.
The system deletes any terrains that don't intersect with the bounding box.
Compute Visibility Data
The Compute Visibility Data tool lets you compute visibility from one terrain to another.
Steps:
- Right Click on the terrains you want to compute visibility data for and then select Terrain > Compute Visibility Data.
Once the system completes the calculation, you can see a new Terrain Visibility Data component on each terrain you selected.
- Specify options for the calculation:
- Check Bounding Corners: Select to also shoot a ray for each corner.
- Check Neighbors: Select to set the terrain to accessible if all neighbors are accessible.
- Forced Enable Tile: Terrains that are forced to visible.
- Visible Tiles: Show all the visible terrains
- Forced Disable Tile: Terrains that are forced disabled.
- Disable Tiles: Show all the disabled terrains.
- Draw Debug: Highlight the visible tiles in green and obstructed tiles in red.
By default, the system performs the visibility data calculation as follows:
- The system casts a ray from the center of a terrain to the center of the other terrain.
- It detects anything that intersects with the ray other than the selected terrains.
Detecting Visibility Blockers
To place a visibility blocker, follow these steps:
- Add any type of object.
- Set the layer for the object to TerrainVisibilityBlocker.
- Recompute the the visibility data. It should look like this:
Clear Visibility Data
To clear visibility data, follow these steps:
- Select the terrain you want to clear visibility data for.
- Right-click and navigate to Terrain > Clear Visibility Data.
Use visibility data
Before you can use visibiliity data, you must add a Terrain Visibility Updater component to any of the objects.
The component controls the way the system hides or shows terrain based on the view Frustrum.
Split a terrain
For information on splitting terrain, see: https://docs.unity3d.com/Packages/com.unity.terrain-tools@2.0/manual/toolbox-terrain-edit.html#split