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

# ExportHolesmapTexture

### Export Holesmap Texture

Export single texture

```csharp
Texture2D ExportHolesmapTexture(TerrainData terrainData, int resolution = 0)
```

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

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).

***

Export grid split textures

```csharp
Texture2D[] ExportHolesmapTexture(TerrainData terrainData, 
            int splitCountHorizontal, int splitCountVertical, 
            int resolution = 0)
```

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.

***

Exporting single texture from grid split array

```csharp
Texture2D ExportHolesmapTexture(TerrainData terrainData, 
          int splitCountHorizontal, int splitCountVertical, 
          int splitColumnIndex, int splitRowIndex, 
          int resolution = 0)
```

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>*.
