> For the complete documentation index, see [llms.txt](https://2yeet.gitbook.io/anvilcsg/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://2yeet.gitbook.io/anvilcsg/surfaces-and-content/terrain.md).

# Terrain

Anvil Terrain is an editable mesh plane built for level geometry. It is not Unity Terrain and does not create terrain data or control-map assets.

## Create a terrain plane

1. Select **Terrain** from the left toolbar.
2. Set Width, Depth, Subdivisions X, and Subdivisions Z.
3. Click **New Terrain Plane**.

The default plane is `16 x 16 m` with `16 x 16` subdivisions. The maximum is 256 subdivisions per axis.

Changing the size or subdivision count resamples the existing height, planar offsets, and paint weights. Anvil creates a recovery checkpoint before these topology changes.

## Sculpt

Select the terrain, open the Terrain panel, and choose **Sculpt**. Available operations are:

* **Raise / Lower**
* **Smooth**
* **Flatten**

Set Radius and Strength before painting in Perspective. **Flatten** also uses Flatten Height.

Left-click and drag over the terrain to sculpt. Hold `Shift` while **Raise / Lower** is active to lower instead of raise. Press `Escape` when finished. Escape stops the active edit and returns to Select, but keeps the Terrain side panel open.

## Edit vertices, edges, and faces

Choose **Vertex**, **Edge**, or **Face** in the Terrain panel for direct mesh editing.

* Height movement changes elevation.
* Planar movement changes horizontal position.
* Editing works in Perspective and orthographic panes.
* Hold `Shift` for precision movement.
* Planar movement respects Grid Snap and Magnet Snap.

Use direct element editing for controlled slopes, paths, ledges, and boundary changes that are difficult to paint with the sculpt brush.

## Paint materials

Terrain supports four material layers:

* Base
* Layer 2
* Layer 3
* Layer 4

Assign a source Material to each layer, choose the active layer, then set Radius and Strength. Click **Painting Active** and paint in Perspective. Click **Stop** or press `Escape` when finished. Escape stops painting without hiding the Terrain side panel.

The paint weights are stored per vertex on the terrain mesh. Common albedo and normal texture property names are detected from the assigned materials.

> **Detail limit:** Paint detail follows the terrain subdivision density. Add subdivisions before painting when you need a smaller transition area.

The current painting path does not create a heatmap or a separate control-map asset.

## UV controls

Use the UV section to change:

* Tile X
* Tile Z
* Offset X
* Offset Z

Click **Reset UV** to return to the default mapping.

## Collision and reset

The Collider control offers:

* **None**
* **Mesh Collider**

The panel also shows vertex and triangle statistics. Use **Reset Heights** to flatten the current terrain without replacing its size. Use **Reset 16 x 16** to return the terrain to its default dimensions and topology.

Anvil Terrain shaders include Universal Render Pipeline and Built-in Render Pipeline paths. Custom material results still depend on whether each shader supports the active render pipeline.
