> 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/material-paint.md).

# Material Paint

Material Paint assigns project materials directly to brush faces. Open it from the left toolbar or press `Shift+A`.

The panel has two tabs:

* **Brush Paint** changes materials on brush geometry.
* **Decal** places projected decal meshes. See [Decals](/anvilcsg/surfaces-and-content/decals.md).

## Add materials to the palette

Drag one or more Material assets from the Project window into the material palette. The palette is saved between workspace sessions.

Use the search field to filter a large palette. Remove a material from the palette with its remove button. This only removes the palette entry. It does not delete the Material asset.

The **Dev Textures** row also provides:

* **Checker / Dev Grid** for checking scale and alignment
* **NoDraw** for surfaces that should not render
* **Collider** for collision-only surfaces

## Paint brushes

Select a material in the palette, then use these controls in an orthographic or Perspective pane:

| Input                     | Result                                         |
| ------------------------- | ---------------------------------------------- |
| Left click                | Paint one face                                 |
| Shift+left click          | Paint the whole brush                          |
| Ctrl/Cmd+Shift+left click | Paint the whole group                          |
| Left click and drag       | Paint continuously                             |
| Ctrl/Cmd+left click       | Sample a material and its UV coordinate system |
| Alt+left click            | Apply the sampled material alignment           |

Grouped coplanar faces at the same hit depth can paint together. Trigger brushes do not accept material painting.

Generated stairs use logical material slots. Painting a stair face updates the matching slot, such as Tread, Riser, Left, or Right, so the material survives regeneration.

Click **Stop Painting**, press `Escape`, or select another tool when finished.

The last selected material remains the **New Brushes** material after painting stops. Newly created brushes use it on every face until another material is selected or **Reset** is clicked. NoDraw creation still overrides this choice when NoDraw creation is enabled.

While painting is active, incompatible geometry and placement tools are disabled. Activating another workflow stops painting, and sampling a material with Ctrl/Cmd+click opens the Paint panel so there is no hidden paint state.

## Target scope

The **Target** control sets how much geometry receives the selected material:

* **Face** paints the face under the pointer.
* **Brush** paints every face on that brush.
* **Group** paints the brushes in the group.

The keyboard modifiers above provide temporary access to these scopes without changing the Target control.

## Projection

Choose **World** or **Face** from the Projection control before painting. Use **Align From Neighbor** when the new face should continue the UVs from touching geometry.

Enable **Texture Lock** when the texture should stay attached to geometry while the brush is moved or edited. Disable it for world-aligned projection that slides across the moving brush. The global Texture Lock shortcut is `Shift+L`.

For more control, see [UV Alignment](/anvilcsg/surfaces-and-content/uv-alignment.md).

## Edit a material

Double-click a palette material, or open its context menu and choose **Edit Material**. The material editor opens inside the Anvil Workspace.

It uses the material shader, including custom shaders and custom inspectors. Depending on that shader, it can show:

* Textures, colors, floats, ranges, and other visible shader properties
* A **Hidden Properties** foldout
* Render Queue
* Enable Instancing
* Double Sided GI
* **Show in Project**

Changes are written to the Material asset and update the workspace.

Texture tiling and offset are intentionally not shown in the material editor. Use brush UV controls for those values instead.
