> For the complete documentation index, see [llms.txt](https://amazing-assets.gitbook.io/terrain-to-mesh/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://amazing-assets.gitbook.io/terrain-to-mesh/run-time-api/terraintomesh/exportholesmaptexture.md).

# ExportHolesmapTexture

### Export Holesmap Texture

```csharp
Texture2D ExportHolesmapTexture(int resolution = 0)
```

Exports holesmap texture from [TerrainData](https://docs.unity3d.com/ScriptReference/TerrainData.html) object.

If  *<mark style="color:blue;">resolution</mark>* property is set to **0**, then exported texture size is read from the [TerrainData](https://docs.unity3d.com/ScriptReference/TerrainData.html).

***

```csharp
Texture2D[] ExportHolesmapTexture(int resolution, int splitCountHorizontal, int splitCountVertical)
```

Splits terrain into 2D grid by *<mark style="color:blue;">splitCountHorizontal</mark>* and *<mark style="color:blue;">splitCountVertical</mark>* amount and for each chunk calculates Holesmap texture.

***

```csharp
Texture2D ExportHolesmapTexture(int resolution, int splitCountHorizontal, int splitCountVertical, int splitColumnIndex, int splitRowIndex)
```

Splits terrain into 2D grid by *<mark style="color:blue;">splitCountHorizontal</mark>* and *<mark style="color:blue;">splitCountVertical</mark>* amount and calculates Holesmap texture for chunk with index *<mark style="color:blue;">splitColumnIndex</mark>* and *<mark style="color:blue;">splitRowIndex</mark>*.
